Module global_state

Module global_state 

Source

Structs§

GcStatusWord 🔒
A lock-free, atomic encoding of GcStatus. This packs the variant tag into a usize so the whole status fits in a single machine word and can be updated with compare-and-swap instead of behind a Mutex<GcStatus>. The tag is kept to Self::TAG_BITS bits (rather than using the whole word) to leave room for a payload-carrying variant (e.g. a nesting depth) to be added later without needing to re-encode the rest.
GlobalState
This stores some global states for an MMTK instance. Some MMTK components like plans and allocators may keep an reference to the struct, and can access it.
LiveBytesStats
Statistics for the live bytes in the last GC. The statistics is per space.

Enums§

GcStatus
The status of MMTk’s GC subsystem. This doubles as the “is MMTk initialized” flag (via GcStatus::Uninitialized) and as the state that tracks whether a GC is running and, if so, what phase it is in. See GcStatusWord for how this is stored atomically and which transitions between variants are legal.
PauseRequestOutcome 🔒
The outcome of GcStatusWord::try_request_pause.