10 let layout = Layout::from_size_align(1024, 1).unwrap();
12 .alloc(layout.clone(), AllocInit::Zeroed)
13 .unwrap_or_else(|_| handle_alloc_error(layout));
15 let mut i = memory.ptr.cast::<u8>().as_ptr();
16 let end = i.add(layout.size());
21 Global.dealloc(memory.ptr, layout);
26 #[cfg_attr(miri, ignore)] // isolated Miri does not support benchmarks
27 fn alloc_owned_small(b: &mut Bencher) {
29 let _: Box<_> = box 10;