瀏覽代碼

Add SysTinyGetMem and similar to interface to allow use in heaptrc unit

git-svn-id: trunk@33680 -
pierre 9 年之前
父節點
當前提交
4af209ac50
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      rtl/inc/tnyheaph.inc

+ 8 - 0
rtl/inc/tnyheaph.inc

@@ -25,8 +25,16 @@
       HeapEnd: Pointer = nil;  { end of heap }
       FreeList: Pointer = nil; { pointer to the first free block }
       HeapPtr: Pointer = nil;  { pointer to the last free block }
+      HeapSize : {$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};
     procedure Mark(var p: Pointer);
     procedure Release(var p: Pointer);
+    function SysTinyGetMem(Size: ptruint): pointer;
+    function SysTinyFreeMem(Addr: Pointer): ptruint;
+    function SysTinyFreeMemSize(Addr: Pointer; Size: Ptruint): ptruint;
+    function SysTinyMemSize(p: pointer): ptruint;
+    function SysTinyGetFPCHeapStatus : TFPCHeapStatus;
+    function SysTinyGetHeapStatus : THeapStatus;
+    function SysTinyTryResizeMem(var p: pointer; size: ptruint) : boolean;