fix info reported by memory manager under DL_MALLOC and SYSTEM_MALLOC

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1635 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2006-05-18 16:33:05 +00:00
parent ef80f1df70
commit ee78d90bb9
11 changed files with 77 additions and 23 deletions

View File

@@ -2174,9 +2174,7 @@ static void
sweep_trail(choiceptr gc_B, tr_fr_ptr old_TR)
{
tr_fr_ptr trail_ptr, dest;
#if !USE_MALLOC
Int OldHeapUsed = HeapUsed;
#endif
#ifdef DEBUG
Int hp_entrs = 0, hp_erased = 0, hp_not_in_use = 0,
hp_in_use_erased = 0, code_entries = 0;
@@ -2456,13 +2454,11 @@ sweep_trail(choiceptr gc_B, tr_fr_ptr old_TR)
(long int)(hp_erased*100/(hp_erased+hp_in_use_erased)),
(long int)(hp_erased+hp_in_use_erased));
#endif
#if !USE_SYSTEM_MALLOC
fprintf(Yap_stderr,
"%% Heap: recovered %ld bytes (%ld%%) out of %ld\n",
(unsigned long int)(OldHeapUsed-HeapUsed),
(unsigned long int)((OldHeapUsed-HeapUsed)/(OldHeapUsed/100)),
(unsigned long int)OldHeapUsed);
#endif
}
CleanDeadClauses();
}