mmtk::scheduler::gc_work

Trait ScanObjectsWork

source
pub trait ScanObjectsWork<VM: VMBinding>: GCWork<VM> + Sized {
    type E: ProcessEdgesWork<VM = VM>;

    // Required methods
    fn post_scan_object(&self, object: ObjectReference);
    fn get_bucket(&self) -> WorkBucketStage;

    // Provided method
    fn do_work_common(
        &self,
        buffer: &[ObjectReference],
        worker: &mut GCWorker<<Self::E as ProcessEdgesWork>::VM>,
        mmtk: &'static MMTK<<Self::E as ProcessEdgesWork>::VM>,
    ) { ... }
}
Expand description

Trait for a work packet that scans objects

Required Associated Types§

source

type E: ProcessEdgesWork<VM = VM>

The associated ProcessEdgesWork for processing the outgoing edges of the objects in this packet.

Required Methods§

source

fn post_scan_object(&self, object: ObjectReference)

Called after each object is scanned.

source

fn get_bucket(&self) -> WorkBucketStage

Return the work bucket for this work packet and its derived work packets.

Provided Methods§

source

fn do_work_common( &self, buffer: &[ObjectReference], worker: &mut GCWorker<<Self::E as ProcessEdgesWork>::VM>, mmtk: &'static MMTK<<Self::E as ProcessEdgesWork>::VM>, )

The common code for ScanObjects and PlanScanObjects.

Object Safety§

This trait is not object safe.

Implementors§