X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FCmm.h;h=415dc4c056c0238c87e30e327975ff6522cffcf6;hb=b07f38769e7fb7ff94e9ca7eb8387b582a98bdb2;hp=e989a00e6219296902c8c4a6a17aa9b03c5bd8b4;hpb=b250f6185627671d8b3e80004671663fe88ac80f;p=ghc-hetmet.git diff --git a/ghc/includes/Cmm.h b/ghc/includes/Cmm.h index e989a00..415dc4c 100644 --- a/ghc/includes/Cmm.h +++ b/ghc/includes/Cmm.h @@ -317,8 +317,11 @@ HP_CHK_GEN(alloc,liveness,reentry); \ TICK_ALLOC_HEAP_NOCTR(alloc); +// allocateLocal() allocates from the nursery, so we check to see +// whether the nursery is nearly empty in any function that uses +// allocateLocal() - this includes many of the primops. #define MAYBE_GC(liveness,reentry) \ - if (CInt[alloc_blocks] >= CInt[alloc_blocks_lim]) { \ + if (bdescr_link(CurrentNursery) == NULL) { \ R9 = liveness; \ R10 = reentry; \ jump stg_gc_gen_hp; \