Parcourir la source

Always return allocated size in TraceFreeMemSize

Pierre Muller il y a 3 mois
Parent
commit
1527c578bf
1 fichiers modifiés avec 6 ajouts et 1 suppressions
  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;