Skip to main content

FrameAllocator

Trait FrameAllocator 

Source
pub trait FrameAllocator:
    Clone
    + Sync
    + Send
    + 'static {
    // Required methods
    fn alloc_frame(&self) -> Option<PhysAddr>;
    fn dealloc_frame(&self, frame: PhysAddr);
    fn phys_to_virt(&self, paddr: PhysAddr) -> *mut u8;

    // Provided methods
    fn alloc_frames(&self, frames: usize, _align: usize) -> Option<PhysAddr> { ... }
    fn dealloc_frames(&self, start: PhysAddr, frames: usize, frame_size: usize) { ... }
}

Required Methods§

Provided Methods§

Source

fn alloc_frames(&self, frames: usize, _align: usize) -> Option<PhysAddr>

Source

fn dealloc_frames(&self, start: PhysAddr, frames: usize, frame_size: usize)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§