mmtk/plan/concurrent/
mod.rs

1pub mod barrier;
2pub(super) mod concurrent_marking_work;
3pub(super) mod global;
4
5pub use self::global::ConcurrentPlan;
6
7pub mod immix;
8
9use bytemuck::NoUninit;
10
11/// The pause type for a concurrent GC phase.
12// TODO: This is probably not be general enough for all the concurrent plans.
13// TODO: We could consider moving this to specific plans later.
14#[repr(u8)]
15#[derive(Debug, PartialEq, Eq, Copy, Clone, NoUninit, Default)]
16pub enum Pause {
17    /// A whole GC (including root scanning, closure, releasing, etc.) happening in a single pause.
18    ///
19    /// Don't be confused with "full-heap" GC in generational collectors.  `Pause::Full` can also
20    /// refer to a nursery GC that happens in a single pause.
21    #[default]
22    Full = 1,
23    /// The initial pause before concurrent marking.
24    InitialMark,
25    /// The pause after concurrent marking.
26    FinalMark,
27    /// A reference-counting-only pause. Used by plans that combine reference counting with
28    /// optional concurrent marking (e.g. LXR). Concurrent marking is NOT active during this
29    /// pause — any in-flight concurrent work is postponed.
30    RefCount,
31}
32
33unsafe impl bytemuck::ZeroableInOption for Pause {}
34
35unsafe impl bytemuck::PodInOption for Pause {}