From 9ed40aa92651163e41e1d8e67858b8e37ce3a1ef Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 10 May 2009 09:28:47 +0000 Subject: [PATCH] - reverted r13079, it gives wrong results when using heaptrc with an program that does nothing. It was also not logical, because the expected free heap at the end is the total heap size minus any allocated blocks and minus the memory that was allocated before heaptrc was activated (as the old code calculated, and as it does again now -- mantis #13678) git-svn-id: trunk@13124 - --- rtl/inc/heaptrc.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtl/inc/heaptrc.pp b/rtl/inc/heaptrc.pp index 9ad0ca58ab..5686adb53b 100644 --- a/rtl/inc/heaptrc.pp +++ b/rtl/inc/heaptrc.pp @@ -1121,7 +1121,7 @@ begin else Writeln(ptext^); Writeln(ptext^,'True free heap : ',status.CurrHeapFree); - ExpectedHeapFree:=status.CurrHeapFree + ExpectedHeapFree:=status.CurrHeapSize -(loc_info^.getmem8_size-loc_info^.freemem8_size) -(loc_info^.getmem_cnt-loc_info^.freemem_cnt)*(sizeof(theap_mem_info)+extra_info_size) -EntryMemUsed;