patch applied (ghc): Fix #650: use a card table to mark dirty sections of mutable arrays

Simon Marlow marlowsd at gmail.com
Fri Dec 18 05:25:50 EST 2009


Thu Dec 17 14:42:28 PST 2009  Simon Marlow <marlowsd at gmail.com>
  * Fix #650: use a card table to mark dirty sections of mutable arrays
  Ignore-this: 75c354682c9ad1b71b68b5bc4cedd6de
  The card table is an array of bytes, placed directly following the
  actual array data.  This means that array reading is unaffected, but
  array writing needs to read the array size from the header in order to
  find the card table.
  
  We use a bytemap rather than a bitmap, because updating the card table
  must be multi-thread safe.  Each byte refers to 128 entries of the
  array, but this is tunable by changing the constant
  MUT_ARR_PTRS_CARD_BITS in includes/Constants.h.

    M ./compiler/codeGen/CgPrimOp.hs -2 +14
    M ./includes/Cmm.h +3
    M ./includes/HaskellConstants.hs +3
    M ./includes/mkDerivedConstants.c +1
    M ./includes/rts/Constants.h +7
    M ./includes/rts/storage/ClosureMacros.h -1 +29
    M ./includes/rts/storage/Closures.h +2
    M ./rts/PrimOps.cmm -5 +23
    M ./rts/Weak.c -2 +9
    M ./rts/sm/Scav.c -54 +123

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20091217224228-12142-41b7d2a0891c7e548d0ded7e4b55d229759ccca0.gz



More information about the Cvs-ghc mailing list