[−][src]Trait mmtk::policy::space::Space
Required methods
pub fn as_space(&self) -> &dyn Space<VM>
[src]
pub fn as_sft(&self) -> &(dyn SFT + Sync + 'static)
[src]
pub fn get_page_resource(&self) -> &dyn PageResource<VM>
[src]
pub fn init(&mut self, vm_map: &'static VMMap)
[src]
pub fn common(&self) -> &CommonSpace<VM>
[src]
pub unsafe fn unsafe_common_mut(&self) -> &mut CommonSpace<VM>
[src]
Safety
This get's a mutable reference from self. (i.e. make sure their are no concurrent accesses through self when calling this)_
pub fn release_multiple_pages(&mut self, start: Address)
[src]
Provided methods
pub fn acquire(&self, tls: OpaquePointer, pages: usize) -> Address
[src]
pub fn address_in_space(&self, start: Address) -> bool
[src]
pub fn in_space(&self, object: ObjectReference) -> bool
[src]
pub unsafe fn grow_discontiguous_space(&self, chunks: usize) -> Address
[src]
Safety
potential data race as this mutates 'common' FIXME: This does not sound like 'unsafe', it is more like 'incorrect'. Any allocator/mutator may do slowpath allocation, and call this.
pub fn grow_space(&self, start: Address, bytes: usize, new_chunk: bool)
[src]
This hook is called by page resources each time a space grows. The space may tap into the hook to monitor heap growth. The call is made from within the page resources' critical region, immediately before yielding the lock.
@param start The start of the newly allocated space @param bytes The size of the newly allocated space @param new_chunk {@code true} if the new space encroached upon or started a new chunk or chunks.
pub fn ensure_mapped(&self)
[src]
Ensure this space is marked as mapped -- used when the space is already mapped (e.g. for a vm image which is externally mmapped.)
pub fn reserved_pages(&self) -> usize
[src]
pub fn get_name(&self) -> &'static str
[src]
pub fn common_mut(&mut self) -> &mut CommonSpace<VM>
[src]
pub fn release_discontiguous_chunks(&mut self, chunk: Address)
[src]
pub unsafe fn release_all_chunks(&self)
[src]
Safety
TODO: I am not sure why this is unsafe.
pub fn print_vm_map(&self)
[src]
Implementations
impl<VM> dyn Space<VM> where
VM: Any + 'static,
VM: VMBinding,
[src]
VM: Any + 'static,
VM: VMBinding,
pub fn is<__T: Space<VM>>(&self) -> bool
[src]
Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T: Space<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: Space<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: Space<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: Space<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.