#[non_exhaustive]pub struct Mmap {}Available on crate feature
full only.Expand description
A basic map of virtual to physical memory.
In certain build configurations, this may include guard pages to check for out-of-bounds access.
If a guaranteed amount of virtual address space usage of virtual location is required, see UncheckedMmap.
When combined with virtual_location, the use of guard pages may mean that the valid start
of the virtual allocation is not at the requested location. Retrieve the valid start using
virtual_valid_start, as_ptr, or similar after
creating the mapping to get the correct address.
Trait Implementations§
impl Copy for Mmap
Source§impl Mappable for Mmap
impl Mappable for Mmap
Source§fn virtual_size(&self, frame_count: usize) -> NonZero<usize>
fn virtual_size(&self, frame_count: usize) -> NonZero<usize>
The number of pages required to create a mapping with
frame_count frames.Source§fn base_virtual_offset(&self) -> isize
fn base_virtual_offset(&self) -> isize
The number of pages to offset the physical memory into the allocated virtual memory.
Auto Trait Implementations§
impl Freeze for Mmap
impl RefUnwindSafe for Mmap
impl Send for Mmap
impl Sync for Mmap
impl Unpin for Mmap
impl UnsafeUnpin for Mmap
impl UnwindSafe for Mmap
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)