mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 14:19:28 +02:00
+ added RegisterTinyHeapBlock_Simple_Prealigned procedure, which is the same as
RegisterTinyHeapBlock_Simple, but expects its address and size parameters to be already aligned on a TinyHeapAllocGranularity boundary git-svn-id: trunk@28651 -
This commit is contained in:
parent
be9e44a821
commit
bb07318386
@ -316,6 +316,20 @@
|
||||
HeapEnd:=Pointer(TTinyHeapPointerArithmeticType(AAddress)+ASize);
|
||||
end;
|
||||
|
||||
{ Strongly simplified version of RegisterTinyHeapBlock, which can be used when
|
||||
the heap is only a single contiguous memory block and the address and size
|
||||
are already aligned on a TinyHeapAllocGranularity boundary. }
|
||||
procedure RegisterTinyHeapBlock_Simple_Prealigned(AAddress: Pointer; ASize: PtrUInt);
|
||||
begin
|
||||
{$ifdef DEBUG_TINY_HEAP}
|
||||
Writeln('RegisterTinyHeapBlock_Simple_Prealigned(', HexStr(AAddress), ',', ASize, ')');
|
||||
{$endif DEBUG_TINY_HEAP}
|
||||
HeapOrg:=AAddress;
|
||||
HeapPtr:=AAddress;
|
||||
FreeList:=AAddress;
|
||||
HeapEnd:=Pointer(TTinyHeapPointerArithmeticType(AAddress)+ASize);
|
||||
end;
|
||||
|
||||
procedure RegisterTinyHeapBlock(AAddress: pointer; ASize: ptruint);
|
||||
var
|
||||
alignment_inc: smallint;
|
||||
|
Loading…
Reference in New Issue
Block a user