pub unsafe trait FrameAllocator<S: PageSize> {
    // Required method
    fn allocate_frame(&mut self) -> Option<PhysFrame<S>>;
Expand description

A trait for types that can allocate a frame of memory.


The implementer of this trait must guarantee that the allocate_frame method returns only unique unused frames. Otherwise, undefined behavior may result from two callers modifying or deallocating the same frame.

Required Methods§


fn allocate_frame(&mut self) -> Option<PhysFrame<S>>

Allocate a frame of the appropriate size and return it if possible.