#[repr(C, align(4096))]pub struct PageTable {
entries: [PtEntry4k; 512],
}Expand description
The Page Table (L1): 512 entries, 4 KiB-aligned.
Fields§
§entries: [PtEntry4k; 512]Implementations§
Source§impl PageTable
impl PageTable
Sourcepub const fn get(&self, i: L1Index) -> PtEntry4k
pub const fn get(&self, i: L1Index) -> PtEntry4k
Read the entry at i.
Plain load; does not imply any TLB synchronization.
Sourcepub const fn set(&mut self, i: L1Index, e: PtEntry4k)
pub const fn set(&mut self, i: L1Index, e: PtEntry4k)
Write the entry at i.
Caller must handle any required TLB invalidation when changing active mappings.
Sourcepub const fn set_zero(&mut self, i: L1Index)
pub const fn set_zero(&mut self, i: L1Index)
Set the entry at i to PtEntry4k::zero.
Caller is responsible for necessary TLB invalidations if this affects an active address space.
Sourcepub const fn index_of(va: VirtualAddress) -> L1Index
pub const fn index_of(va: VirtualAddress) -> L1Index
Derive the PT index from a virtual address.
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