[][src]Trait mmtk::Plan

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

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

pub fn new(
    vm_map: &'static VMMap,
    mmapper: &'static Mmapper,
    options: Arc<UnsafeOptionsWrapper>,
    scheduler: &'static MMTkScheduler<Self::VM>
) -> Self
[src]

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

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

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

pub fn bind_mutator(
    &'static self,
    tls: OpaquePointer,
    mmtk: &'static MMTK<Self::VM>
) -> Box<Self::Mutator>
[src]

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

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

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

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

Loading content...

Provided methods

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

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

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

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

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

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

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

pub fn collection_required(
    &self,
    space_full: bool,
    _space: &dyn Space<Self::VM>
) -> bool where
    Self: Sized
[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.

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

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

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

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

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

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

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

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

pub fn reset_collection_trigger(&self)[src]

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

Loading content...

Implementors

Loading content...