diff --git a/src/main.rs b/src/main.rs index 6be02e6..ac9d847 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,7 +37,7 @@ fn main() -> ! { static mut HEAP: [u8; HEAP_SIZE] = [0; HEAP_SIZE]; #[global_allocator] static ALLOCATOR: embedded_alloc::Heap = embedded_alloc::Heap::empty(); - unsafe { ALLOCATOR.init(&mut HEAP as *const u8 as usize, core::mem::size_of_val(&HEAP)) }; + unsafe { ALLOCATOR.init(core::ptr::addr_of_mut!(HEAP) as usize, HEAP_SIZE) } // -------- Setup peripherials -------- let mut pac = pac::Peripherals::take().unwrap();