pub struct PageTable {
root_ppn: PhysPageNum,
frames: Vec<FrameTracker>,
}
Fields§
§root_ppn: PhysPageNum
§frames: Vec<FrameTracker>
Implementations§
Source§impl PageTable
Assume that it won’t oom when creating/mapping.
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<&mut 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 Freeze for PageTable
impl RefUnwindSafe for PageTable
impl Send for PageTable
impl Sync for PageTable
impl Unpin for PageTable
impl UnwindSafe for PageTable
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