From 0f80603daea63b856b712a50bc64e661c3891bd3 Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 22 May 2017 20:27:08 +0000 Subject: [PATCH] + SysGetMem: Add DEBUG_TINY_HEAP message after SysAlloc call. * Change InternalTinyAlign procedure: Change variable ASize to be VAR parameter type so that possible size reduction required by alignment is propagated correctly to calling function. git-svn-id: trunk@36297 - --- rtl/inc/tinyheap.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtl/inc/tinyheap.inc b/rtl/inc/tinyheap.inc index 5061b80e7b..86afd4ae40 100644 --- a/rtl/inc/tinyheap.inc +++ b/rtl/inc/tinyheap.inc @@ -157,6 +157,9 @@ end else } begin +{$ifdef DEBUG_TINY_HEAP} + Writeln('SysAlloc returned: ',HexStr(p)); +{$endif DEBUG_TINY_HEAP} RegisterTinyHeapBlock(p,AllocSize); { Recursive call } SysGetMem:=SysGetMem(Size); @@ -501,7 +504,7 @@ FreeList := p; end; - procedure InternalTinyAlign(var AAddress: Pointer; ASize: PtrUInt); + procedure InternalTinyAlign(var AAddress: Pointer; var ASize: {$ifdef FPC_TINYHEAP_HUGE}LongInt{$else}PtrUInt{$endif}); var alignment_inc: smallint; begin