Expand description
This module updates of VO bits during GC. It is used for spaces that do not clear the metadata of some dead objects during GC. Currently, only ImmixSpace is affected.
Policy | When are VO bits of dead objects cleared |
---|---|
MarkSweepSpace | when sweeping cells of dead objects |
MarkCompactSpace | when compacting |
CopySpace | when releasing the space |
The policies listed above trivially clear the VO bits for dead objects (individually or in bulk), and make the VO bits available during tracing.
For ImmixSpace, if a line contains both live and dead objects, live objects will be traced, but dead objects will not be visited. Therefore we cannot clear the VO bits of individual dead objects. We cannot clear all VO bits for the line in bulk because it contains live objects. This module updates the VO bits for such regions (e.g. Immix lines, or Immix blocks if Immix is configured to be block-only).
We implement several strategies depending on whether mmtk-core or the VM binding also requires the VO bits to also be available during tracing.
The handling is very sensitive to VOBitUpdateStrategy
, and may be a bit verbose.
We abstract VO-bit-related code out of the main GC algorithms (such as Immix) to make it more
readable.
Enums§
- The strategy to update the valid object (VO) bits.
Functions§
- strategy 🔒Select a strategy for the VM. It is a
const
function so it always returns the same strategy for a given VM.