add a comment to sweep algorithm
This commit is contained in:
parent
563b65efde
commit
40bfe13895
2
src/gc.c
2
src/gc.c
|
@ -449,7 +449,7 @@ gc_sweep_phase(pic_state *pic)
|
||||||
continue;
|
continue;
|
||||||
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)) {
|
||||||
p->s.ptr = f;
|
p->s.ptr = f; /* For dead objects we can safely reuse ptr field */
|
||||||
f = p;
|
f = p;
|
||||||
}
|
}
|
||||||
gc_unmark(p);
|
gc_unmark(p);
|
||||||
|
|
Loading…
Reference in New Issue