// q is still BLACKHOLE'd.
thunk_selector_depth++;
val = evacuate(p);
+ thunk_selector_depth--;
// Update the THUNK_SELECTOR with an indirection to the
// EVACUATED closure now at p. Why do this rather than
*/
if (failed_to_evac) {
failed_to_evac = rtsFalse;
- recordMutableGen((StgClosure *)q, stp->gen);
+ if (stp->gen_no > 0) {
+ recordMutableGen((StgClosure *)q, stp->gen);
+ }
}
}
if (failed_to_evac) {
failed_to_evac = rtsFalse;
- recordMutableGen((StgClosure *)q, &generations[evac_gen]);
+ if (evac_gen > 0) {
+ recordMutableGen((StgClosure *)q, &generations[evac_gen]);
+ }
}
// mark the next bit to indicate "scavenged"
p = bd->start;
if (scavenge_one(p)) {
- recordMutableGen((StgClosure *)p, stp->gen);
+ if (stp->gen_no > 0) {
+ recordMutableGen((StgClosure *)p, stp->gen);
+ }
}
}
}