fix gc bug
This commit is contained in:
parent
36b455d9c2
commit
1fc4ef18d1
5
src/gc.c
5
src/gc.c
|
@ -230,7 +230,7 @@ gc_sweep_phase(pic_state *pic)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
base = pic->heap->base;
|
base = pic->heap->base;
|
||||||
for (p = base->s.ptr; p != base; p = p->s.ptr) {
|
for (p = base->s.ptr; ; p = p->s.ptr) {
|
||||||
|
|
||||||
#if GC_DEBUG
|
#if GC_DEBUG
|
||||||
puts("sweeping block");
|
puts("sweeping block");
|
||||||
|
@ -283,6 +283,9 @@ gc_sweep_phase(pic_state *pic)
|
||||||
|
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p->s.ptr == base)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue