pub struct PageTable {
root_ppn: PhysPageNum,
frames: Vec<FrameTracker>,
}
Expand description
page table structure
Fields
root_ppn: PhysPageNum
frames: Vec<FrameTracker>
Implementations
sourceimpl PageTable
impl PageTable
Assume that it won’t oom when creating/mapping.
pub fn new() -> Self
sourcepub fn from_token(satp: usize) -> Self
pub fn from_token(satp: usize) -> Self
Temporarily used to get arguments from user space.
fn find_pte_create(&mut self, vpn: VirtPageNum) -> Option<&mut PageTableEntry>
fn find_pte(&self, vpn: VirtPageNum) -> Option<&PageTableEntry>
pub fn map(&mut self, vpn: VirtPageNum, ppn: PhysPageNum, flags: PTEFlags)
pub fn unmap(&mut self, vpn: VirtPageNum)
pub fn translate(&self, vpn: VirtPageNum) -> Option<PageTableEntry>
pub fn translate_va(&self, va: VirtAddr) -> Option<PhysAddr>
pub fn token(&self) -> usize
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more