pub struct MemoryArea<B: MappingBackend> { /* private fields */ }Expand description
A memory area represents a continuous range of virtual memory with the same flags.
The target physical memory frames are determined by MappingBackend and
may not be contiguous.
Implementations§
Source§impl<B: MappingBackend> MemoryArea<B>
impl<B: MappingBackend> MemoryArea<B>
Sourcepub fn new_with_reported_flags(
start: B::Addr,
size: usize,
flags: B::Flags,
reported_flags: B::Flags,
backend: B,
) -> Self
pub fn new_with_reported_flags( start: B::Addr, size: usize, flags: B::Flags, reported_flags: B::Flags, backend: B, ) -> Self
Creates a new memory area with separate backend and reported flags.
flags are used for page-table/backend operations. reported_flags
are metadata exposed through introspection interfaces such as procfs.
§Panics
Panics if start + size overflows.
Sourcepub const fn reported_flags(&self) -> B::Flags
pub const fn reported_flags(&self) -> B::Flags
Returns the permission flags reported to user-visible introspection.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for MemoryArea<B>
impl<B> RefUnwindSafe for MemoryArea<B>where
<B as MappingBackend>::Flags: RefUnwindSafe,
B: RefUnwindSafe,
<B as MappingBackend>::Addr: RefUnwindSafe,
impl<B> Send for MemoryArea<B>
impl<B> Sync for MemoryArea<B>
impl<B> Unpin for MemoryArea<B>
impl<B> UnsafeUnpin for MemoryArea<B>where
<B as MappingBackend>::Flags: UnsafeUnpin,
B: UnsafeUnpin,
<B as MappingBackend>::Addr: UnsafeUnpin,
impl<B> UnwindSafe for MemoryArea<B>where
<B as MappingBackend>::Flags: UnwindSafe,
B: UnwindSafe,
<B as MappingBackend>::Addr: UnwindSafe,
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