page_table_generic

Trait Access

Source
pub trait Access {
    // Required methods
    fn va_offset(&self) -> usize;
    unsafe fn alloc(&mut self, layout: Layout) -> Option<NonNull<u8>>;
    unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: Layout);
}

Required Methods§

Source

fn va_offset(&self) -> usize

Source

unsafe fn alloc(&mut self, layout: Layout) -> Option<NonNull<u8>>

Alloc memory for a page table entry.

§Safety

should be deallocated by [dealloc].

Source

unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: Layout)

dealloc memory for a page table entry.

§Safety

ptr must be allocated by [alloc].

Implementors§