Struct mmtk::util::heap::layout::byte_map_mmapper::ByteMapMmapper
source · pub struct ByteMapMmapper {
lock: Mutex<()>,
mapped: [Atomic<MapState>; 2048],
}
Fields§
§lock: Mutex<()>
§mapped: [Atomic<MapState>; 2048]
Implementations§
source§impl ByteMapMmapper
impl ByteMapMmapper
pub fn new() -> Self
fn bytes_to_mmap_chunks_up(bytes: usize) -> usize
fn pages_to_mmap_chunks_up(pages: usize) -> usize
fn address_to_mmap_chunks_down(addr: Address) -> usize
fn mmap_chunks_to_address(chunk: usize) -> Address
fn address_to_mmap_chunks_up(addr: Address) -> usize
Trait Implementations§
source§impl Debug for ByteMapMmapper
impl Debug for ByteMapMmapper
source§impl Default for ByteMapMmapper
impl Default for ByteMapMmapper
source§impl Mmapper for ByteMapMmapper
impl Mmapper for ByteMapMmapper
source§fn is_mapped_address(&self, addr: Address) -> bool
fn is_mapped_address(&self, addr: Address) -> bool
Return {@code true} if the given address has been mmapped
@param addr The address in question. @return {@code true} if the given address has been mmapped
source§fn eagerly_mmap_all_spaces(&self, _space_map: &[Address])
fn eagerly_mmap_all_spaces(&self, _space_map: &[Address])
Given an address array describing the regions of virtual memory to be used
by MMTk, demand zero map all of them if they are not already mapped. Read more
source§fn mark_as_mapped(&self, start: Address, bytes: usize)
fn mark_as_mapped(&self, start: Address, bytes: usize)
Mark a number of pages as mapped, without making any
request to the operating system. Used to mark pages
that the VM has already mapped. Read more
source§fn ensure_mapped(
&self,
start: Address,
pages: usize,
strategy: MmapStrategy,
anno: &MmapAnnotation<'_>
) -> Result<()>
fn ensure_mapped( &self, start: Address, pages: usize, strategy: MmapStrategy, anno: &MmapAnnotation<'_> ) -> Result<()>
Ensure that a range of pages is mmapped (or equivalent). If the
pages are not yet mapped, demand-zero map them. Note that mapping
occurs at chunk granularity, not page granularity. Read more
source§fn quarantine_address_range(
&self,
start: Address,
pages: usize,
strategy: MmapStrategy,
anno: &MmapAnnotation<'_>
) -> Result<()>
fn quarantine_address_range( &self, start: Address, pages: usize, strategy: MmapStrategy, anno: &MmapAnnotation<'_> ) -> Result<()>
Quarantine/reserve address range. We mmap from the OS with no reserve and with PROT_NONE,
which should be little overhead. This ensures that we can reserve certain address range that
we can use if needed. Quarantined memory needs to be mapped before it can be used. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ByteMapMmapper
impl Send for ByteMapMmapper
impl Sync for ByteMapMmapper
impl Unpin for ByteMapMmapper
impl UnwindSafe for ByteMapMmapper
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