Trait page_table::PagingIf
source · pub trait PagingIf: Sized {
// Required methods
fn alloc_frame() -> Option<PhysAddr>;
fn dealloc_frame(paddr: PhysAddr);
fn phys_to_virt(paddr: PhysAddr) -> VirtAddr;
}
Expand description
The low-level OS-dependent helpers that must be provided for
PageTable64
.
Required Methods§
sourcefn alloc_frame() -> Option<PhysAddr>
fn alloc_frame() -> Option<PhysAddr>
Request to allocate a 4K-sized physical frame.
sourcefn dealloc_frame(paddr: PhysAddr)
fn dealloc_frame(paddr: PhysAddr)
Request to free a allocated physical frame.
sourcefn phys_to_virt(paddr: PhysAddr) -> VirtAddr
fn phys_to_virt(paddr: PhysAddr) -> VirtAddr
Returns a virtual address that maps to the given physical address.
Used to access the physical memory directly in page table implementation.
Object Safety§
This trait is not object safe.