mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
Make HeapMgr.GetAlignedMem public. This function is useful for embedded targets where alignment > 32(or sizeof(pointer)) bytes is required.
Fix RegisterHeapBlock. Calling FreeMem requires the heap manager to be installed, plus it requires the size of the segment to be stored in front of the pointer. Instead use InternalFreeMem git-svn-id: trunk@29611 -
This commit is contained in:
parent
7a826cc481
commit
85c5e7330a
@ -18,6 +18,8 @@ Unit heapmgr;
|
||||
interface
|
||||
|
||||
procedure RegisterHeapBlock(AAddress: pointer; ASize: ptruint);
|
||||
|
||||
function GetAlignedMem(Size, Alignment: ptruint): pointer;
|
||||
|
||||
implementation
|
||||
|
||||
@ -220,7 +222,7 @@ Unit heapmgr;
|
||||
|
||||
procedure RegisterHeapBlock(AAddress: pointer; ASize: ptruint);
|
||||
begin
|
||||
FreeMem(AAddress, ASize);
|
||||
InternalFreeMem(AAddress, ASize);
|
||||
end;
|
||||
|
||||
const
|
||||
|
Loading…
Reference in New Issue
Block a user