pub trait GCWorkContext: Send + 'static {
    type VM: VMBinding;
    type PlanType: Plan<VM = Self::VM>;
    type DefaultProcessEdges: ProcessEdgesWork<VM = Self::VM>;
    type PinningProcessEdges: ProcessEdgesWork<VM = Self::VM>;
}
Expand description

This trait provides a group of associated types that are needed to create GC work packets for a certain plan. For example, GCWorkScheduler.schedule_common_work() needs this trait to schedule different work packets. For certain plans, they may need to provide several types that implement this trait, e.g. one for nursery GC, one for mature GC.

Note: Because GCWorkContext is often used as parameters of implementations of GCWork, we let GCWorkContext require Send + 'static. Since GCWorkContext is just a group of associated types, its implementations should not have any actual fields other than PhantomData, and will automatically have Send + 'static.

Required Associated Types§

source

type VM: VMBinding

source

type PlanType: Plan<VM = Self::VM>

source

type DefaultProcessEdges: ProcessEdgesWork<VM = Self::VM>

The ProcessEdgesWork implementation to use for tracing edges that do not have special pinning requirements. Concrete plans and spaces may choose to move or not to move the objects the traced edges point to.

source

type PinningProcessEdges: ProcessEdgesWork<VM = Self::VM>

The ProcessEdgesWork implementation to use for tracing edges that must not be updated (i.e. the objects the traced edges pointed to must not be moved). This is used for implementing pinning roots and transitive pinning roots.

  • For non-transitive pinning roots, PinningProcessEdges will be used to trace the edges from roots to objects, but their descendents will be traced using DefaultProcessEdges.
  • For transitive pinning roots, PinningProcessEdges will be used to trace the edges from roots to objects, and will also be used to trace the outgoing edges of all objects reachable from transitive pinning roots.

If a plan does not support object pinning, it should use UnsupportedProcessEdges for this type member.

Implementors§

source§

impl<VM: VMBinding> GCWorkContext for GenCopyGCWorkContext<VM>

source§

impl<VM: VMBinding> GCWorkContext for GenCopyNurseryGCWorkContext<VM>

source§

impl<VM: VMBinding> GCWorkContext for GenImmixNurseryGCWorkContext<VM>

source§

impl<VM: VMBinding> GCWorkContext for MarkCompactForwardingGCWorkContext<VM>

source§

impl<VM: VMBinding> GCWorkContext for MarkCompactGCWorkContext<VM>

source§

impl<VM: VMBinding> GCWorkContext for MSGCWorkContext<VM>

source§

impl<VM: VMBinding> GCWorkContext for PPGCWorkContext<VM>

source§

impl<VM: VMBinding> GCWorkContext for SSGCWorkContext<VM>

source§

impl<VM: VMBinding> GCWorkContext for StickyImmixNurseryGCWorkContext<VM>

source§

impl<VM: VMBinding, const KIND: u8> GCWorkContext for GenImmixMatureGCWorkContext<VM, KIND>

source§

impl<VM: VMBinding, const KIND: u8> GCWorkContext for ImmixGCWorkContext<VM, KIND>

§

type VM = VM

§

type PlanType = Immix<VM>

§

type DefaultProcessEdges = PlanProcessEdges<VM, Immix<VM>, KIND>

§

type PinningProcessEdges = PlanProcessEdges<VM, Immix<VM>, TRACE_KIND_TRANSITIVE_PIN>

source§

impl<VM: VMBinding, const KIND: u8> GCWorkContext for StickyImmixMatureGCWorkContext<VM, KIND>