[gc] show freed object counts
This commit is contained in:
parent
c41c5533fe
commit
136977f357
10
src/gc.c
10
src/gc.c
|
@ -228,6 +228,8 @@ gc_sweep_phase(pic_state *pic)
|
||||||
union header *base, *bp, *p;
|
union header *base, *bp, *p;
|
||||||
|
|
||||||
#if GC_DEBUG
|
#if GC_DEBUG
|
||||||
|
int freed = 0;
|
||||||
|
|
||||||
puts("sweep started");
|
puts("sweep started");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -284,12 +286,20 @@ gc_sweep_phase(pic_state *pic)
|
||||||
p = p->s.ptr;
|
p = p->s.ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GC_DEBUG
|
||||||
|
freed++;
|
||||||
|
#endif
|
||||||
|
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->s.ptr == base)
|
if (p->s.ptr == base)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GC_DEBUG
|
||||||
|
printf("freed: %d counts\n", freed);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue