fix case where OldHeapUsed is 0 (mallinfo not available).
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1637 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
326583c727
commit
f9987d9fe9
12
C/heapgc.c
12
C/heapgc.c
@ -2454,11 +2454,13 @@ 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*100/(hp_erased+hp_in_use_erased)),
|
||||||
(long int)(hp_erased+hp_in_use_erased));
|
(long int)(hp_erased+hp_in_use_erased));
|
||||||
#endif
|
#endif
|
||||||
fprintf(Yap_stderr,
|
if (OldHeapUsed) {
|
||||||
"%% Heap: recovered %ld bytes (%ld%%) out of %ld\n",
|
fprintf(Yap_stderr,
|
||||||
(unsigned long int)(OldHeapUsed-HeapUsed),
|
"%% Heap: recovered %ld bytes (%ld%%) out of %ld\n",
|
||||||
(unsigned long int)((OldHeapUsed-HeapUsed)/(OldHeapUsed/100)),
|
(unsigned long int)(OldHeapUsed-HeapUsed),
|
||||||
(unsigned long int)OldHeapUsed);
|
(unsigned long int)((OldHeapUsed-HeapUsed)/(OldHeapUsed/100)),
|
||||||
|
(unsigned long int)OldHeapUsed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CleanDeadClauses();
|
CleanDeadClauses();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user