This commit is contained in:
Yuichi Nishiwaki 2013-11-25 11:10:57 +09:00
parent f11623f075
commit 52f1776b22
1 changed files with 2 additions and 2 deletions

View File

@ -449,12 +449,12 @@ gc_sweep_phase(pic_state *pic)
for (p = bp + bp->s.size; p != bp->s.ptr; p += p->s.size) {
if (! gc_is_marked(p)) {
if (s == NULL) {
s = t = p;
s = p;
}
else {
t->s.ptr = p;
t = t->s.ptr;
}
t = p;
t->s.ptr = NULL; /* For dead objects we can safely reuse ptr field */
}
gc_unmark(p);