Fix #650: use a card table to mark dirty sections of mutable arrays
[ghc-hetmet.git] / includes / Cmm.h
index 69b5acc..ff91146 100644 (file)
 #define StgFunInfoExtra_bitmap(i)     StgFunInfoExtraFwd_bitmap(i)
 #endif
 
+#define mutArrPtrsCardWords(n) \
+    ROUNDUP_BYTES_TO_WDS(((n) + (1 << MUT_ARR_PTRS_CARD_BITS) - 1) >> MUT_ARR_PTRS_CARD_BITS)
+
 /* -----------------------------------------------------------------------------
    Voluntary Yields/Blocks