pub struct Heap<const SIZE: usize> { /* private fields */ }Expand description
The simplest possible heap.
§Safety
Because it’s the simplest implementation, it does NOT free memory. Any memory you drop cannot be reused (it’s leaked), so avoid dropping anything whenever possible.
It is recommended that you use embedded-alloc
Implementations§
Trait Implementations§
Source§impl<const SIZE: usize> GlobalAlloc for Heap<SIZE>
impl<const SIZE: usize> GlobalAlloc for Heap<SIZE>
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout. Read more