瀏覽代碼

Always return allocated size in TraceFreeMemSize

Pierre Muller 3 月之前
父節點
當前提交
1527c578bf
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      rtl/inc/heaptrc.pp

+ 6 - 1
rtl/inc/heaptrc.pp

@@ -731,7 +731,12 @@ begin
     dec(i,sizeof(theap_mem_info)+extra_size);
     if add_tail then
       dec(i,tail_size);
-    InternalFreeMemSize:=i;
+{$ifdef EXTRA}
+    if (i<size) then
+      dump_wrong_size(pp,size,error_file)
+    else
+{$endif EXTRA}
+      InternalFreeMemSize:=size;
   end else
     InternalFreeMemSize:=size;
 end;