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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".