cleanup
This commit is contained in:
parent
f11623f075
commit
52f1776b22
4
src/gc.c
4
src/gc.c
|
@ -449,12 +449,12 @@ gc_sweep_phase(pic_state *pic)
|
||||||
for (p = bp + bp->s.size; p != bp->s.ptr; p += p->s.size) {
|
for (p = bp + bp->s.size; p != bp->s.ptr; p += p->s.size) {
|
||||||
if (! gc_is_marked(p)) {
|
if (! gc_is_marked(p)) {
|
||||||
if (s == NULL) {
|
if (s == NULL) {
|
||||||
s = t = p;
|
s = p;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
t->s.ptr = p;
|
t->s.ptr = p;
|
||||||
t = t->s.ptr;
|
|
||||||
}
|
}
|
||||||
|
t = p;
|
||||||
t->s.ptr = NULL; /* For dead objects we can safely reuse ptr field */
|
t->s.ptr = NULL; /* For dead objects we can safely reuse ptr field */
|
||||||
}
|
}
|
||||||
gc_unmark(p);
|
gc_unmark(p);
|
||||||
|
|
Loading…
Reference in New Issue