add a comment to sweep algorithm

This commit is contained in:
Yuichi Nishiwaki 2013-11-22 07:30:29 -08:00
parent 563b65efde
commit 40bfe13895
1 changed files with 1 additions and 1 deletions

View File

@ -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);