fix previous module processing fixes

check if predicate is not in use before abolish static


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@763 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2003-02-11 16:33:24 +00:00
parent f59cc22c5d
commit 9a032b656a
4 changed files with 25 additions and 15 deletions

View File

@@ -3161,19 +3161,21 @@ Yap_gc(Int predarity, CELL *current_env, yamop *nextop)
#endif
if (Yap_GetValue(AtomGc) != TermNil)
gc_on = TRUE;
if (IsIntTerm(Tgc_margin = Yap_GetValue(AtomGcMargin)))
if (IsIntTerm(Tgc_margin = Yap_GetValue(AtomGcMargin))) {
gc_margin = IntOfTerm(Tgc_margin);
else {
} else {
if (gc_calls < 8)
gc_margin <<= gc_calls;
else
gc_margin <<= 8;
}
if (gc_margin < 0 || gc_margin > 4000)
if (gc_margin < 0 || gc_margin > 4000) {
gc_margin = (LCL0 - H0) >> 9;
}
gc_margin = gc_margin << 8;
if (gc_on)
if (gc_on) {
effectiveness = do_gc(predarity, current_env, nextop);
}
if (effectiveness > 90) {
while (gc_margin < H-H0)
gc_margin <<= 1;