瀏覽代碼

* fix heap block recycle flag when orphaning

git-svn-id: trunk@7805 -
micha 18 年之前
父節點
當前提交
afb5f32f65
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      rtl/inc/heap.inc

+ 2 - 3
rtl/inc/heap.inc

@@ -1482,10 +1482,9 @@ begin
     poc_next := poc^.next_free;
     poc_next := poc^.next_free;
     { check if this os chunk was 'recycled' i.e. taken in use again }
     { check if this os chunk was 'recycled' i.e. taken in use again }
     if (poc^.size and ocrecycleflag) = 0 then
     if (poc^.size and ocrecycleflag) = 0 then
-    begin
+      free_oschunk(loc_freelists, poc)
+    else
       poc^.size := poc^.size and not ocrecycleflag;
       poc^.size := poc^.size and not ocrecycleflag;
-      free_oschunk(loc_freelists, poc);
-    end;
     poc := poc_next;
     poc := poc_next;
   end;
   end;
   loc_freelists^.oslist := nil;
   loc_freelists^.oslist := nil;