瀏覽代碼

* simplify RegisterTinyHeapBlock by calling InternalTinyFreeMem directly,
instead of FreeMem. We already do the alignments correctly, so going through
FreeMem is no longer necessary.

git-svn-id: trunk@28428 -

nickysn 11 年之前
父節點
當前提交
7986d0c2ca
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      rtl/inc/tinyheap.inc

+ 1 - 2
rtl/inc/tinyheap.inc

@@ -271,8 +271,7 @@
         Inc(AAddress,alignment_inc);
         Inc(AAddress,alignment_inc);
         Dec(ASize,alignment_inc);
         Dec(ASize,alignment_inc);
         Dec(ASize,ASize mod TinyHeapAllocGranularity);
         Dec(ASize,ASize mod TinyHeapAllocGranularity);
-        PTinyHeapMemBlockSize(AAddress)^ := ASize - SizeOf(TTinyHeapMemBlockSize);
-        FreeMem(Pointer(PTinyHeapMemBlockSize(AAddress) + 1), ASize - SizeOf(TTinyHeapMemBlockSize));
+        InternalTinyFreeMem(AAddress, ASize);
       end;
       end;
 
 
     const
     const