Module global_state

Module global_state 

Source

Structs§

GcStatusWord 🔒
A lock-free, atomic encoding of GcStatus. This packs the variant tag into the low bits of a usize and, for GcStatus::Disabled, the nesting depth into the remaining high bits, so the whole status fits in a single machine word and can be updated with atomic operations instead of behind a Mutex<GcStatus>.
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 (the internal atomic encoding of this type) for how this is stored atomically and which transitions between variants are legal.