[−][src]Trait sunrise_kernel::frame_allocator::FrameAllocatorTrait
An arch-specific FrameAllocator must expose the following functions
Required methods
fn allocate_region(length: usize) -> Result<PhysicalMemRegion, KernelError>
Allocates a single PhysicalMemRegion. Frames are physically consecutive.
fn allocate_frames_fragmented(
length: usize
) -> Result<Vec<PhysicalMemRegion>, KernelError>
length: usize
) -> Result<Vec<PhysicalMemRegion>, KernelError>
Allocates physical frames, possibly fragmented across several physical regions.
Provided methods
fn allocate_frame() -> Result<PhysicalMemRegion, KernelError>
Allocates a single physical frame.
Implementors
impl FrameAllocatorTrait for FrameAllocator
[src]
fn allocate_region(length: usize) -> Result<PhysicalMemRegion, KernelError>
[src]
Allocates a single PhysicalMemRegion. Frames are physically consecutive.
Errors
InvalidSize
length
is not page size aligned.length
is 0.
Panics
- Panics if FRAME_ALLOCATOR was not initialized.
fn allocate_frames_fragmented(
length: usize
) -> Result<Vec<PhysicalMemRegion>, KernelError>
[src]
length: usize
) -> Result<Vec<PhysicalMemRegion>, KernelError>