pub trait PageSize: Ord + PartialOrd + Clone + Copy + Sealed + 'static {
    const SIZE: MemChunkSize;
    const NUM_4K_PAGES: usize;
    const SIZE_IN_BYTES: usize;
}
Expand description

Trait that represents the size of a page or frame, i.e., for normal or huge pages.

This is used to parameterize Page- and Frame-related types with a page size, in order to define normal and huge pages in a generic manner.

Required Associated Constants§

Implementors§

source§

impl PageSize for Page1G

source§

const SIZE: MemChunkSize = MemChunkSize::Huge1G

source§

const NUM_4K_PAGES: usize = 262_144usize

source§

const SIZE_IN_BYTES: usize = 1_073_741_824usize

source§

impl PageSize for Page2M

source§

const SIZE: MemChunkSize = MemChunkSize::Huge2M

source§

const NUM_4K_PAGES: usize = 512usize

source§

const SIZE_IN_BYTES: usize = 2_097_152usize

source§

impl PageSize for Page4K

source§

const SIZE: MemChunkSize = MemChunkSize::Normal4K

source§

const NUM_4K_PAGES: usize = 1usize

source§

const SIZE_IN_BYTES: usize = 4_096usize