diff --git a/examples/global_alloc.rs b/examples/global_alloc.rs index dcf42c5..9197794 100644 --- a/examples/global_alloc.rs +++ b/examples/global_alloc.rs @@ -20,7 +20,7 @@ fn main() -> ! { use core::mem::MaybeUninit; const HEAP_SIZE: usize = 1024; static mut HEAP: [MaybeUninit; HEAP_SIZE] = [MaybeUninit::uninit(); HEAP_SIZE]; - unsafe { ALLOCATOR.init((&mut HEAP).as_ptr() as usize, HEAP_SIZE) } + unsafe { ALLOCATOR.init(HEAP.as_ptr() as usize, HEAP_SIZE) } } let mut xs = Vec::new();