X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FCmm.h;h=5a380594beb37692b9fdb1a69d008aa592e3a403;hb=9d909b3bb9a0740f272dadf4a35b642e1404fe3c;hp=415dc4c056c0238c87e30e327975ff6522cffcf6;hpb=bf8219815876579f80b4e30188b982bf3e673199;p=ghc-hetmet.git diff --git a/ghc/includes/Cmm.h b/ghc/includes/Cmm.h index 415dc4c..5a38059 100644 --- a/ghc/includes/Cmm.h +++ b/ghc/includes/Cmm.h @@ -292,6 +292,8 @@ #error mp_limb_t != StgWord: assumptions in PrimOps.cmm are now false #endif +#define MyCapability() (BaseReg - OFFSET_Capability_r) + /* ------------------------------------------------------------------------- Allocation and garbage collection ------------------------------------------------------------------------- */ @@ -321,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; \