• Simon Marlow's avatar
    Fix #650: use a card table to mark dirty sections of mutable arrays · 0417404f
    Simon Marlow authored
    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.
    0417404f
mkDerivedConstants.c 13.7 KB