From da78b223247abe7eaee7bf069185c5f901d63c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa=20II?= Date: Tue, 20 Apr 2010 23:08:08 +0100 Subject: [PATCH] fix fixes to garbage collector. --- C/heapgc.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/C/heapgc.c b/C/heapgc.c index 78ddcceb9..1751709a8 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -1150,9 +1150,6 @@ check_global(void) { /* mark a heap object and all heap objects accessible from it */ -static void -mark_variable(CELL_PTR current); - static void mark_variable(CELL_PTR current) { @@ -1185,23 +1182,9 @@ mark_variable(CELL_PTR current) } PUSH_POINTER(next-1); } - next++; - if (!UNMARKED_MARK(next,local_bp)) { - total_marked++; - if (next < HGEN) { - total_oldies++; - } - PUSH_POINTER(next); - } - next++; - if (!UNMARKED_MARK(next,local_bp)) { - total_marked++; - if (next < HGEN) { - total_oldies++; - } - PUSH_POINTER(next); - } - POP_CONTINUATION(); + PUSH_CONTINUATION(next+1,2); + current = next; + goto begin; } else if (ONHEAP(next)) { #ifdef EASY_SHUNTING CELL cnext; @@ -1273,7 +1256,7 @@ mark_variable(CELL_PTR current) goto begin; #ifdef DEBUG } else if (next < (CELL *)Yap_GlobalBase || next > (CELL *)Yap_TrailTop) { - fprintf(Yap_stderr, "ooops while marking %lx, %p at %p\n", (unsigned long int)ccur, current, next); + fprintf(Yap_stderr, "ooops while marking, current=%p, *current=%lx next=%p\n", current, (unsigned long int)ccur, next); #endif } else { #ifdef COROUTING