mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 23:59:10 +02:00
+ implemented Mark and Release for the tiny heap
git-svn-id: trunk@28700 -
This commit is contained in:
parent
d26e6278ba
commit
4e48190342
@ -319,6 +319,17 @@
|
|||||||
Dec(MaxAvail, SizeOf(TTinyHeapMemBlockSize));
|
Dec(MaxAvail, SizeOf(TTinyHeapMemBlockSize));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure Mark(var p: Pointer);
|
||||||
|
begin
|
||||||
|
p := HeapPtr;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Release(var p: Pointer);
|
||||||
|
begin
|
||||||
|
HeapPtr := p;
|
||||||
|
FreeList := p;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure InternalTinyAlign(var AAddress: Pointer; ASize: PtrUInt);
|
procedure InternalTinyAlign(var AAddress: Pointer; ASize: PtrUInt);
|
||||||
var
|
var
|
||||||
alignment_inc: smallint;
|
alignment_inc: smallint;
|
||||||
|
@ -28,4 +28,5 @@
|
|||||||
|
|
||||||
function MemAvail: {$ifdef FPC_TINYHEAP_HUGE}LongInt{$else}PtrUInt{$endif};
|
function MemAvail: {$ifdef FPC_TINYHEAP_HUGE}LongInt{$else}PtrUInt{$endif};
|
||||||
function MaxAvail: {$ifdef FPC_TINYHEAP_HUGE}LongInt{$else}PtrUInt{$endif};
|
function MaxAvail: {$ifdef FPC_TINYHEAP_HUGE}LongInt{$else}PtrUInt{$endif};
|
||||||
|
procedure Mark(var p: Pointer);
|
||||||
|
procedure Release(var p: Pointer);
|
||||||
|
Loading…
Reference in New Issue
Block a user