Struct project1::page_table::PageTable
source · pub struct PageTable(_);
Expand description
4-level page table of x86_64.
Implementations§
source§impl PageTable
impl PageTable
sourcepub fn map(
&mut self,
va: Va,
pg: Page,
perm: Permission
) -> Result<(), PageTableMappingError>
pub fn map( &mut self, va: Va, pg: Page, perm: Permission ) -> Result<(), PageTableMappingError>
Map pg
into va
with permission perm
.
sourcepub unsafe fn do_map(
&mut self,
va: Va,
pa: Pa,
perm: Permission
) -> Result<(), PageTableMappingError>
pub unsafe fn do_map( &mut self, va: Va, pa: Pa, perm: Permission ) -> Result<(), PageTableMappingError>
sourcepub fn unmap(&mut self, va: Va) -> Result<Page, PageTableMappingError>
pub fn unmap(&mut self, va: Va) -> Result<Page, PageTableMappingError>
Unmap the va
and returns Page
that was mapped to va
.
sourcepub fn walk(&self, va: Va) -> Result<&Pte, PageTableMappingError>
pub fn walk(&self, va: Va) -> Result<&Pte, PageTableMappingError>
Walk the page table and return corresponding pte of the va
if exist.
Auto Trait Implementations§
impl RefUnwindSafe for PageTable
impl Send for PageTable
impl Sync for PageTable
impl Unpin for PageTable
impl UnwindSafe for PageTable
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,
const: unstable§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more