Open
Description
Looks like at the moment, we use VMLocalMarkBitSpec
to define per-object mark metadata, and it only allows one bit of metadata for each object. This prevents from the implementation of cyclic mark bits.
Normally the cyclic mark state will take up more than one bits in the header or on the side, act as a N-bit integer IntN
. At the start of each GC the mark state is increased by one, and all existing objects in the heap will automatically become "unmarked" states. So the GC does not need to zero all the mark bits at the start of each GC. When the mark state overflows the max value of IntN
, it will cyclic back to the minimum valid value of IntN
(usually 0 or 1).