[project @ 2006-01-11 16:58:53 by simonmar]
authorsimonmar <unknown>
Wed, 11 Jan 2006 16:58:53 +0000 (16:58 +0000)
committersimonmar <unknown>
Wed, 11 Jan 2006 16:58:53 +0000 (16:58 +0000)
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

index d0dedb8..5a38059 100644 (file)
 // 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;                            \