We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1be51e commit 5d404a8Copy full SHA for 5d404a8
examples/global_alloc.rs
@@ -20,7 +20,7 @@ fn main() -> ! {
20
use core::mem::MaybeUninit;
21
const HEAP_SIZE: usize = 1024;
22
static mut HEAP: [MaybeUninit<u8>; HEAP_SIZE] = [MaybeUninit::uninit(); HEAP_SIZE];
23
- unsafe { ALLOCATOR.init((&mut HEAP).as_ptr() as usize, HEAP_SIZE) }
+ unsafe { ALLOCATOR.init(HEAP.as_ptr() as usize, HEAP_SIZE) }
24
}
25
26
let mut xs = Vec::new();
0 commit comments