mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 21:07:21 +01:00
* fixed heap block start and size alignment in RegisterTinyHeapBlock
git-svn-id: trunk@24519 -
This commit is contained in:
parent
4fc5900c78
commit
9312419ce8
@ -230,11 +230,13 @@
|
||||
{$ifdef DEBUG_TINY_HEAP}
|
||||
Writeln('RegisterTinyHeapBlock(', ptruint(AAddress), ',', ASize, ')');
|
||||
{$endif DEBUG_TINY_HEAP}
|
||||
if (ptruint(AAddress) and 1) = 0 then
|
||||
if (ptruint(AAddress) and 1) <> 0 then
|
||||
begin
|
||||
Inc(AAddress);
|
||||
Dec(ASize);
|
||||
end;
|
||||
if (ASize and 1) <> 0 then
|
||||
Dec(ASize);
|
||||
pptruint(AAddress)^ := ASize - SizeOf(ptruint);
|
||||
FreeMem(pptruint(AAddress) + 1, ASize - SizeOf(ptruint));
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user