#else
#undef scavenge_block
#undef evacuate
+#undef recordMutableGen_GC
#endif
static void scavenge_block (bdescr *bd, StgPtr scan);
StgInfoTable *info;
step *saved_evac_step;
rtsBool saved_eager_promotion;
+ step_workspace *ws;
p = scan;
saved_eager_promotion = gct->eager_promotion;
gct->failed_to_evac = rtsFalse;
+ ws = &gct->steps[bd->step->abs_no];
+
// we might be evacuating into the very object that we're
// scavenging, so we have to check the real bd->free pointer each
// time around the loop.
- while (p < bd->free) {
+ while (p < bd->free || (bd == ws->todo_bd && p < ws->todo_free)) {
ASSERT(LOOKS_LIKE_CLOSURE_PTR(p));
info = get_itbl((StgClosure *)p);
}
}
- debugTrace(DEBUG_gc, " scavenged %ld bytes", (bd->free - scan) * sizeof(W_));
+ if (p > bd->free) {
+ bd->free = p;
+ }
+
+ debugTrace(DEBUG_gc, " scavenged %ld bytes",
+ (unsigned long)((bd->free - scan) * sizeof(W_)));
}