Trait allocator::BaseAllocator
source · pub trait BaseAllocator {
// Required methods
fn init(&mut self, start: usize, size: usize);
fn add_memory(&mut self, start: usize, size: usize) -> AllocResult;
}
Expand description
The base allocator inherited by other allocators.
Required Methods§
sourcefn init(&mut self, start: usize, size: usize)
fn init(&mut self, start: usize, size: usize)
Initialize the allocator with a free memory region.
sourcefn add_memory(&mut self, start: usize, size: usize) -> AllocResult
fn add_memory(&mut self, start: usize, size: usize) -> AllocResult
Add a free memory region to the allocator.