pub enum PteType {
Page(usize),
PageTable(usize),
}Expand description
The PTE can either be a page or page table.
Variants§
Page(usize)
The PTE refers to a physical page.
PageTable(usize)
The PTE refers to another page table.
Implementations§
Source§impl PteType
impl PteType
Sourcepub fn is_page_table(&self) -> bool
pub fn is_page_table(&self) -> bool
Returns true if the PteType is a page table and false otherwise.
Sourcepub fn level(&self) -> usize
pub fn level(&self) -> usize
Extracts the level at which the PTE is found. The level is a monotonicly increasing number that starts at zero for the leaf page table and where the maximum number is the root page table.
Sourcepub fn is_huge_page(&self) -> bool
pub fn is_huge_page(&self) -> bool
Returns whether the current PTE refers to a huge page, i.e. it checks whether the page type
is a page and the level is non-zero. Returns true if it is a huge page and false
otherwise.
Trait Implementations§
impl Copy for PteType
impl Eq for PteType
impl StructuralPartialEq for PteType
Auto Trait Implementations§
impl Freeze for PteType
impl RefUnwindSafe for PteType
impl Send for PteType
impl Sync for PteType
impl Unpin for PteType
impl UnwindSafe for PteType
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