pub struct UnifiedMemory<C> { /* private fields */ }Expand description
The kernel’s memory manager, wrapping a page cache.
Generic over the cache type; the bound lives on the impl blocks that
actually need it (not the struct) so UnifiedMemory<C> also works over a
cache that only implements the read-only, mmap-backed
MmapPageSource trait
rather than the full read/write UnifiedPageCache.
Implementations§
Source§impl<C> UnifiedMemory<C>
impl<C> UnifiedMemory<C>
Sourcepub fn into_cache(self) -> C
pub fn into_cache(self) -> C
Consumes the manager, returning the wrapped cache.
Source§impl<C: UnifiedPageCache> UnifiedMemory<C>
impl<C: UnifiedPageCache> UnifiedMemory<C>
Sourcepub fn map_read(
&mut self,
cap: &Capability,
block_id: u64,
) -> Result<&Page, CacheError>
pub fn map_read( &mut self, cap: &Capability, block_id: u64, ) -> Result<&Page, CacheError>
Maps a page for reading (capability-checked). Same bytes the storage engine holds.
Sourcepub fn map_write(
&mut self,
cap: &Capability,
block_id: u64,
) -> Result<&mut Page, CacheError>
pub fn map_write( &mut self, cap: &Capability, block_id: u64, ) -> Result<&mut Page, CacheError>
Maps a page for writing (capability-checked).
Auto Trait Implementations§
impl<C> Freeze for UnifiedMemory<C>where
C: Freeze,
impl<C> RefUnwindSafe for UnifiedMemory<C>where
C: RefUnwindSafe,
impl<C> Send for UnifiedMemory<C>where
C: Send,
impl<C> Sync for UnifiedMemory<C>where
C: Sync,
impl<C> Unpin for UnifiedMemory<C>where
C: Unpin,
impl<C> UnsafeUnpin for UnifiedMemory<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for UnifiedMemory<C>where
C: 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