Trait hermit::mm::paging::PageSize [−][src]
pub trait PageSize: Copy { const SIZE: usize; const MAP_LEVEL: usize; const MAP_EXTRA_FLAG: PageTableEntryFlags; }
Expand description
A generic interface to support all possible page sizes.
This is defined as a subtrait of Copy to enable #[derive(Clone, Copy)] for Page. Currently, deriving implementations for these traits only works if all dependent types implement it as well.
Associated Constants
const SIZE: usize
[src]
Expand description
The page size in bytes.
const MAP_LEVEL: usize
[src]
Expand description
The page table level at which a page of this size is mapped (from 0 for PT through 3 for PML4). Implemented as a numeric value to enable numeric comparisons.
const MAP_EXTRA_FLAG: PageTableEntryFlags
[src]
Expand description
Any extra flag that needs to be set to map a page of this size. For example: PageTableEntryFlags::HUGE_PAGE
Implementors
impl PageSize for BasePageSize
[src]
impl PageSize for BasePageSize
[src]impl PageSize for HugePageSize
[src]
impl PageSize for HugePageSize
[src]impl PageSize for LargePageSize
[src]
impl PageSize for LargePageSize
[src]