1 2 3 4 5 6 7 8 9 10 11 12 13 14
extern crate alloc; use super::pac; use embedded_alloc::LlffHeap as Heap; #[global_allocator] static HEAP: Heap = Heap::empty(); pub unsafe fn init_heap() { HEAP.init( pac::last_linked_address(), pac::last_address() - pac::last_linked_address(), ) }