+ 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 -
This commit is contained in:
pierre 2017-05-22 20:27:08 +00:00
parent 376174d7ac
commit 0f80603dae

View File

@ -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