From bdf1f1fe94fc5c55ce46d836a383cf2bd7907c88 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 11 Jan 2006 16:58:53 +0000 Subject: [PATCH] [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. --- ghc/includes/Cmm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; \ -- 1.7.10.4