Create a new, empty FixedSizeBlockAlloc:
()
| 33 | { |
| 34 | // Create a new, empty FixedSizeBlockAlloc: |
| 35 | pub const fn new() -> Self |
| 36 | { |
| 37 | const EMPTY: Option<&'static mut ListNode> = None; |
| 38 | FixedSizeBlockAlloc |
| 39 | { |
| 40 | listheads: [EMPTY; BLKSIZES.len()], |
| 41 | fballoc: linked_list_allocator::Heap::empty(), |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | // Initialize allocator, using specified heap-bounds: |
| 46 | pub unsafe fn init(&mut self, heap_start: usize, heap_size: usize) |