fix garbage collection for delays (report from Bart Demoen).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@663 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-10-29 17:23:32 +00:00
parent ace4b58e5b
commit 6d8c592775
3 changed files with 28 additions and 4 deletions

View File

@@ -2890,6 +2890,9 @@ marking_phase(tr_fr_ptr old_TR, CELL *current_env, yamop *curp, CELL *max)
cont_top = (cont *)db_vec;
/* These two must be marked first so that our trail optimisation won't lose
values */
#ifdef COROUTINING
mark_all_suspended_goals();
#endif
mark_regs(old_TR); /* active registers & trail */
#ifdef COROUTINING
mark_delays(max);
@@ -2967,7 +2970,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop)
int gc_verbose = is_gc_verbose();
tr_fr_ptr old_TR;
Int m_time, c_time, time_start, gc_time;
#ifdef COROUTINING
#if COROUTINING
CELL *max = (CELL *)ReadTimedVar(DelayedVars);
#else
CELL *max = NULL;
@@ -2976,7 +2979,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop)
int gc_trace = FALSE;
#if COROUTINING
if (H0 - (CELL *)ReadTimedVar(DelayedVars) < 1024+(2*NUM_OF_ATTS)) {
if (H0 - max < 1024+(2*NUM_OF_ATTS)) {
if (!growglobal(&current_env)) {
Error(SYSTEM_ERROR, TermNil, ErrorMessage);
return FALSE;