From: simonmar Date: Tue, 26 Jul 2005 15:16:40 +0000 (+0000) Subject: [project @ 2005-07-26 15:16:40 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~303 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=deda5eaa86852c08cbafc739ef4df7507cc89aa3;p=ghc-hetmet.git [project @ 2005-07-26 15:16:40 by simonmar] Avoid recording objects in the mutable list of generation 0 (bug introduced on the HEAD recently, it seems) --- diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 47e4971..aa3d1bc 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -3063,7 +3063,9 @@ scavenge(step *stp) */ if (failed_to_evac) { failed_to_evac = rtsFalse; - recordMutableGen((StgClosure *)q, stp->gen); + if (stp->gen_no > 0) { + recordMutableGen((StgClosure *)q, stp->gen); + } } } @@ -3400,7 +3402,9 @@ linear_scan: 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" @@ -4075,7 +4079,9 @@ scavenge_large(step *stp) p = bd->start; if (scavenge_one(p)) { - recordMutableGen((StgClosure *)p, stp->gen); + if (stp->gen_no > 0) { + recordMutableGen((StgClosure *)p, stp->gen); + } } } }