From: simonmar Date: Wed, 11 Jan 2006 16:58:53 +0000 (+0000) Subject: [project @ 2006-01-11 16:58:53 by simonmar] X-Git-Tag: final_switch_to_darcs,_this_repo_is_now_live~34 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=bdf1f1fe94fc5c55ce46d836a383cf2bd7907c88;p=ghc-hetmet.git [project @ 2006-01-11 16:58:53 by simonmar] MAYBE_GC: we should check alloc_blocks in addition to CurrentNursery, since some allocateLocal calls don't allocate from the nursery. --- diff --git a/ghc/includes/Cmm.h b/ghc/includes/Cmm.h index d0dedb8..5a38059 100644 --- a/ghc/includes/Cmm.h +++ b/ghc/includes/Cmm.h @@ -323,7 +323,7 @@ // whether the nursery is nearly empty in any function that uses // allocateLocal() - this includes many of the primops. #define MAYBE_GC(liveness,reentry) \ - if (bdescr_link(CurrentNursery) == NULL) { \ + if (bdescr_link(CurrentNursery) == NULL || CInt[alloc_blocks] >= CInt[alloc_blocks_lim]) { \ R9 = liveness; \ R10 = reentry; \ jump stg_gc_gen_hp; \