Trait mmtk::vm::VMBinding

source ·
pub trait VMBinding
where Self: Sized + 'static + Send + Sync + Default,
{ type VMObjectModel: ObjectModel<Self>; type VMScanning: Scanning<Self>; type VMCollection: Collection<Self>; type VMActivePlan: ActivePlan<Self>; type VMReferenceGlue: ReferenceGlue<Self>; type VMEdge: Edge; type VMMemorySlice: MemorySlice<Edge = Self::VMEdge>; const ALIGNMENT_VALUE: usize = 3_735_928_559usize; const MIN_ALIGNMENT: usize = 4usize; const MAX_ALIGNMENT: usize = 8usize; const USE_ALLOCATION_OFFSET: bool = true; const ALLOC_END_ALIGNMENT: usize = 1usize; }
Expand description

The VMBinding trait associates with each trait, and provides VM-specific constants.

Required Associated Types§


type VMObjectModel: ObjectModel<Self>

The binding’s implementation of crate::vm::ObjectModel.


type VMScanning: Scanning<Self>

The binding’s implementation of crate::vm::Scanning.


type VMCollection: Collection<Self>

The binding’s implementation of crate::vm::Collection.


type VMActivePlan: ActivePlan<Self>

The binding’s implementation of crate::vm::ActivePlan.


type VMReferenceGlue: ReferenceGlue<Self>

The binding’s implementation of crate::vm::ReferenceGlue.


type VMEdge: Edge

The type of edges in this VM.


type VMMemorySlice: MemorySlice<Edge = Self::VMEdge>

The type of heap memory slice in this VM.

Provided Associated Constants§


const ALIGNMENT_VALUE: usize = 3_735_928_559usize

A value to fill in alignment gaps. This value can be used for debugging.


const MIN_ALIGNMENT: usize = 4usize

Allowed minimal alignment in bytes.


const MAX_ALIGNMENT: usize = 8usize

Allowed maximum alignment in bytes.


const USE_ALLOCATION_OFFSET: bool = true

Does the binding use a non-zero allocation offset? If this is false, we expect the binding to always use offset === 0 for allocation, and we are able to do some optimization if we know offset === 0.


const ALLOC_END_ALIGNMENT: usize = 1usize

This value is used to assert if the cursor is reasonable after allocations. At the end of an allocation, the allocation cursor should be aligned to this value. Note that MMTk does not attempt to do anything to align the cursor to this value, but it merely asserts with this constant.

Object Safety§

This trait is not object safe.