stp->abs_no = RtsFlags.GcFlags.steps * g + s;
stp->blocks = NULL;
stp->n_blocks = 0;
+ stp->n_words = 0;
stp->old_blocks = NULL;
stp->n_old_blocks = 0;
stp->gen = &generations[g];
#ifdef THREADED_RTS
initSpinLock(&gc_alloc_block_sync);
- initSpinLock(&static_objects_sync);
initSpinLock(&recordMutableGen_sync);
whitehole_spin = 0;
#endif
step *stp;
if (RtsFlags.GcFlags.generations == 1) {
- return countOccupied(g0s0->blocks) + countOccupied(g0s0->large_objects);
+ return g0s0->n_words + countOccupied(g0s0->large_objects);
}
live = 0;
for (s = 0; s < generations[g].n_steps; s++) {
if (g == 0 && s == 0) continue;
stp = &generations[g].steps[s];
- live += countOccupied(stp->blocks) +
- countOccupied(stp->large_objects);
+ live += stp->n_words + countOccupied(stp->large_objects);
}
}
return live;