Struct allocators::freelist::FreeList
[−]
[src]
pub struct FreeList<'a, A: 'a + Allocator> { // some fields omitted }
A FreeList
allocator manages a list of free memory blocks of uniform size.
Whenever a block is requested, it returns the first free block.
Methods
impl FreeList<'static, HeapAllocator>
fn new(block_size: usize, num_blocks: usize) -> Result<Self, Error>
Creates a new FreeList
backed by the heap. block_size
must be greater
than or equal to the size of a pointer.
impl<'a, A: 'a + Allocator> FreeList<'a, A>
fn new_from(alloc: &'a A, block_size: usize, num_blocks: usize) -> Result<Self, Error>
Creates a new FreeList
backed by another allocator. block_size
must be greater
than or equal to the size of a pointer.