From 30900bd61fa7c99832616167d92c1fb1f4c8ebad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Wed, 24 Sep 2008 00:11:22 +0100 Subject: [PATCH] go back to only doing gc when needed.wq --- C/heapgc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/heapgc.c b/C/heapgc.c index 5de3b61cb..282f064b4 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -3904,7 +3904,7 @@ call_gc(UInt gc_lim, Int predarity, CELL *current_env, yamop *nextop) HGEN = VarOfTerm(Yap_ReadTimedVar(GcGeneration)); if (gc_on && !(Yap_PrologMode & InErrorMode) && /* make sure there is a point in collecting the heap */ - (ASP-H0)*sizeof(CELL) > gc_lim && + (ASP-H0)*sizeof(CELL) > gc_lim && H-HGEN > (LCL0-ASP)/2) { effectiveness = do_gc(predarity, current_env, nextop); if (effectiveness < 0)