Trait mmtk::util::heap::layout::map::VMMap

source ·
pub trait VMMap: Sync {
Show 15 methods // Required methods fn insert(&self, start: Address, extent: usize, descriptor: SpaceDescriptor); fn create_freelist(&self, start: Address) -> CreateFreeListResult; fn create_parent_freelist( &self, start: Address, units: usize, grain: i32 ) -> CreateFreeListResult; unsafe fn allocate_contiguous_chunks( &self, descriptor: SpaceDescriptor, chunks: usize, head: Address, maybe_freelist: Option<&mut dyn FreeList> ) -> Address; fn get_next_contiguous_region(&self, start: Address) -> Address; fn get_contiguous_region_chunks(&self, start: Address) -> usize; fn get_contiguous_region_size(&self, start: Address) -> usize; fn get_available_discontiguous_chunks(&self) -> usize; fn get_chunk_consumer_count(&self) -> usize; fn free_all_chunks(&self, any_chunk: Address); unsafe fn free_contiguous_chunks(&self, start: Address) -> usize; fn finalize_static_space_map( &self, from: Address, to: Address, on_discontig_start_determined: &mut dyn FnMut(Address) ); fn is_finalized(&self) -> bool; fn get_descriptor_for_address(&self, address: Address) -> SpaceDescriptor; fn add_to_cumulative_committed_pages(&self, pages: usize);
}

Required Methods§

source

fn insert(&self, start: Address, extent: usize, descriptor: SpaceDescriptor)

source

fn create_freelist(&self, start: Address) -> CreateFreeListResult

Create a free-list for a discontiguous space. Must only be called at boot time.

source

fn create_parent_freelist( &self, start: Address, units: usize, grain: i32 ) -> CreateFreeListResult

Create a free-list for a contiguous space. Must only be called at boot time.

source

unsafe fn allocate_contiguous_chunks( &self, descriptor: SpaceDescriptor, chunks: usize, head: Address, maybe_freelist: Option<&mut dyn FreeList> ) -> Address

§Safety

Caller must ensure that only one thread is calling this method.

source

fn get_next_contiguous_region(&self, start: Address) -> Address

source

fn get_contiguous_region_chunks(&self, start: Address) -> usize

source

fn get_contiguous_region_size(&self, start: Address) -> usize

source

fn get_available_discontiguous_chunks(&self) -> usize

Return the total number of chunks available (unassigned) within the range of virtual memory apportioned to discontiguous spaces.

source

fn get_chunk_consumer_count(&self) -> usize

Return the total number of clients contending for chunks. This is useful when establishing conservative bounds on the number of remaining chunks.

source

fn free_all_chunks(&self, any_chunk: Address)

source

unsafe fn free_contiguous_chunks(&self, start: Address) -> usize

§Safety

Caller must ensure that only one thread is calling this method.

source

fn finalize_static_space_map( &self, from: Address, to: Address, on_discontig_start_determined: &mut dyn FnMut(Address) )

Finalize the globlal maps in the implementations of VMMap. This should be called after all spaces are created.

Arguments:

  • from: the starting address of the heap
  • to: the address of the last byte within the heap
  • on_discontig_start_determined: Called when the address range of the discontiguous memory range is determined. Will not be called if the VMMap implementation does not have a discontigous memory range. The Address argument of the callback is the starting address of the discontiguous memory range.
source

fn is_finalized(&self) -> bool

source

fn get_descriptor_for_address(&self, address: Address) -> SpaceDescriptor

source

fn add_to_cumulative_committed_pages(&self, pages: usize)

Implementors§