Sfoglia il codice sorgente

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

git-svn-id: trunk@33680 -
pierre 9 anni fa
parent
commit
4af209ac50
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  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;