Trait mmtk::plan::global::Plan[][src]

pub trait Plan: 'static + Sync + Send + Downcast {
    type VM: VMBinding;
    fn constraints(&self) -> &'static PlanConstraints;
fn create_worker_local(
        &self,
        tls: OpaquePointer,
        mmtk: &'static MMTK<Self::VM>
    ) -> GCWorkerLocalPtr;
fn base(&self) -> &BasePlan<Self::VM>;
fn schedule_collection(&'static self, _scheduler: &MMTkScheduler<Self::VM>);
fn gc_init(
        &mut self,
        heap_size: usize,
        vm_map: &'static VMMap,
        scheduler: &Arc<MMTkScheduler<Self::VM>>
    );
fn get_allocator_mapping(
        &self
    ) -> &'static EnumMap<AllocationSemantics, AllocatorSelector>;
fn prepare(&self, tls: OpaquePointer);
fn release(&self, tls: OpaquePointer);
fn get_pages_used(&self) -> usize; fn common(&self) -> &CommonPlan<Self::VM> { ... }
fn mmapper(&self) -> &'static Mmapper { ... }
fn options(&self) -> &Options { ... }
fn in_nursery(&self) -> bool { ... }
fn is_initialized(&self) -> bool { ... }
fn poll(&self, space_full: bool, space: &dyn Space<Self::VM>) -> bool { ... }
fn log_poll(&self, space: &dyn Space<Self::VM>, message: &'static str) { ... }
fn collection_required(
        &self,
        space_full: bool,
        _space: &dyn Space<Self::VM>
    ) -> bool { ... }
fn get_pages_reserved(&self) -> usize { ... }
fn get_total_pages(&self) -> usize { ... }
fn get_pages_avail(&self) -> usize { ... }
fn get_collection_reserve(&self) -> usize { ... }
fn is_emergency_collection(&self) -> bool { ... }
fn get_free_pages(&self) -> usize { ... }
fn stress_test_gc_required(&self) -> bool { ... }
fn handle_user_collection_request(&self, tls: OpaquePointer, force: bool) { ... }
fn reset_collection_trigger(&self) { ... }
fn modify_check(&self, object: ObjectReference) { ... }
fn global_side_metadata_specs(&self) -> &[SideMetadataSpec] { ... } }

A plan describes the global core functionality for all memory management schemes. All global MMTk plans should implement this trait.

The global instance defines and manages static resources (such as memory and virtual memory resources).

Associated Types

Loading content...

Required methods

fn constraints(&self) -> &'static PlanConstraints[src]

fn create_worker_local(
    &self,
    tls: OpaquePointer,
    mmtk: &'static MMTK<Self::VM>
) -> GCWorkerLocalPtr
[src]

fn base(&self) -> &BasePlan<Self::VM>[src]

fn schedule_collection(&'static self, _scheduler: &MMTkScheduler<Self::VM>)[src]

fn gc_init(
    &mut self,
    heap_size: usize,
    vm_map: &'static VMMap,
    scheduler: &Arc<MMTkScheduler<Self::VM>>
)
[src]

fn get_allocator_mapping(
    &self
) -> &'static EnumMap<AllocationSemantics, AllocatorSelector>
[src]

fn prepare(&self, tls: OpaquePointer)[src]

fn release(&self, tls: OpaquePointer)[src]

fn get_pages_used(&self) -> usize[src]

Loading content...

Provided methods

fn common(&self) -> &CommonPlan<Self::VM>[src]

fn mmapper(&self) -> &'static Mmapper[src]

fn options(&self) -> &Options[src]

fn in_nursery(&self) -> bool[src]

fn is_initialized(&self) -> bool[src]

fn poll(&self, space_full: bool, space: &dyn Space<Self::VM>) -> bool[src]

fn log_poll(&self, space: &dyn Space<Self::VM>, message: &'static str)[src]

fn collection_required(
    &self,
    space_full: bool,
    _space: &dyn Space<Self::VM>
) -> bool
[src]

This method controls the triggering of a GC. It is called periodically during allocation. Returns true to trigger a collection.

@param spaceFull Space request failed, must recover pages within ‘space’. @param space TODO @return true if a collection is requested by the plan.

fn get_pages_reserved(&self) -> usize[src]

fn get_total_pages(&self) -> usize[src]

fn get_pages_avail(&self) -> usize[src]

fn get_collection_reserve(&self) -> usize[src]

fn is_emergency_collection(&self) -> bool[src]

fn get_free_pages(&self) -> usize[src]

fn stress_test_gc_required(&self) -> bool[src]

fn handle_user_collection_request(&self, tls: OpaquePointer, force: bool)[src]

fn reset_collection_trigger(&self)[src]

fn modify_check(&self, object: ObjectReference)[src]

fn global_side_metadata_specs(&self) -> &[SideMetadataSpec][src]

Loading content...

Implementations

impl<VM> dyn Plan<VM = VM> where
    VM: Any + 'static, 
[src]

pub fn is<__T: Plan<VM = VM>>(&self) -> bool[src]

Returns true if the trait object wraps an object of type __T.

pub fn downcast<__T: Plan<VM = VM>>(
    self: Box<Self>
) -> Result<Box<__T>, Box<Self>>
[src]

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

pub fn downcast_rc<__T: Plan<VM = VM>>(
    self: Rc<Self>
) -> Result<Rc<__T>, Rc<Self>>
[src]

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

pub fn downcast_ref<__T: Plan<VM = VM>>(&self) -> Option<&__T>[src]

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

pub fn downcast_mut<__T: Plan<VM = VM>>(&mut self) -> Option<&mut __T>[src]

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Implementors

impl<VM: VMBinding> Plan for GenCopy<VM>[src]

type VM = VM

impl<VM: VMBinding> Plan for MarkSweep<VM>[src]

type VM = VM

impl<VM: VMBinding> Plan for NoGC<VM>[src]

type VM = VM

impl<VM: VMBinding> Plan for SemiSpace<VM>[src]

type VM = VM

Loading content...