Struct mmtk::policy::marksweepspace::malloc_ms::metadata::CHUNK_METADATA
source · pub(super) struct CHUNK_METADATA {
__private_field: (),
}
Fields§
§__private_field: ()
Methods from Deref<Target = SideMetadataContext>§
pub fn get_local_specs(&self) -> &[SideMetadataSpec]
sourcepub fn calculate_reserved_pages(&self, data_pages: usize) -> usize
pub fn calculate_reserved_pages(&self, data_pages: usize) -> usize
Return the pages reserved for side metadata based on the data pages we used.
sourcepub fn try_map_metadata_space(&self, start: Address, size: usize) -> Result<()>
pub fn try_map_metadata_space(&self, start: Address, size: usize) -> Result<()>
Tries to map the required metadata space and returns true
is successful.
This can be called at page granularity.
sourcepub fn try_map_metadata_address_range(
&self,
start: Address,
size: usize
) -> Result<()>
pub fn try_map_metadata_address_range( &self, start: Address, size: usize ) -> Result<()>
Tries to map the required metadata address range, without reserving swap-space/physical memory for it. This will make sure the address range is exclusive to the caller. This should be called at chunk granularity.
NOTE: Accessing addresses in this range will produce a segmentation fault if swap-space is not mapped using the try_map_metadata_space
function.
sourcefn map_metadata_internal(
&self,
start: Address,
size: usize,
no_reserve: bool
) -> Result<()>
fn map_metadata_internal( &self, start: Address, size: usize, no_reserve: bool ) -> Result<()>
The internal function to mmap metadata
§Arguments
start
- The starting address of the source data.size
- The size of the source data (in bytes).no_reserve
- whether to invoke mmap with a noreserve flag (we use this flag to quarantine address range)
Trait Implementations§
source§impl Deref for CHUNK_METADATA
impl Deref for CHUNK_METADATA
§type Target = SideMetadataContext
type Target = SideMetadataContext
The resulting type after dereferencing.
source§fn deref(&self) -> &SideMetadataContext
fn deref(&self) -> &SideMetadataContext
Dereferences the value.
impl LazyStatic for CHUNK_METADATA
Auto Trait Implementations§
impl RefUnwindSafe for CHUNK_METADATA
impl Send for CHUNK_METADATA
impl Sync for CHUNK_METADATA
impl Unpin for CHUNK_METADATA
impl UnwindSafe for CHUNK_METADATA
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more