浏览代码

* TinyHeapAllocGranularity changed to SizeOf(TTinyHeapBlock). This fixes a bug
where the free blocks may become fragmented, even though all the memory has
been freed, following certain allocation patterns.

git-svn-id: trunk@28419 -

nickysn 11 年之前
父节点
当前提交
2e0c40d33b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/inc/tinyheap.inc

+ 1 - 1
rtl/inc/tinyheap.inc

@@ -46,7 +46,7 @@
     const
       TinyHeapMinBlock = sizeof(TTinyHeapBlock);
 
-      TinyHeapAllocGranularity = sizeof(Pointer);
+      TinyHeapAllocGranularity = sizeof(TTinyHeapBlock);
 
     var
       TinyHeapBlocks: PTinyHeapBlock = nil;