+ implemented Mark and Release for the tiny heap

git-svn-id: trunk@28700 -
This commit is contained in:
nickysn 2014-09-20 23:33:54 +00:00
parent d26e6278ba
commit 4e48190342
2 changed files with 13 additions and 1 deletions

View File

@ -319,6 +319,17 @@
Dec(MaxAvail, SizeOf(TTinyHeapMemBlockSize));
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);
var
alignment_inc: smallint;

View File

@ -28,4 +28,5 @@
function MemAvail: {$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);