Home
last modified time | relevance | path

Searched refs:Layout (Results 1 – 25 of 37) sorted by relevance

12

/wasmtime-44.0.1/crates/fuzzing/tests/oom/
H A Dsmoke.rs2 alloc::{Layout, alloc, dealloc},
10 layout: Layout,
34 unsafe fn new(layout: Layout) -> Self { in new()
49 let _ = Alloc::new(Layout::new::<u64>()); in smoke_test_missed_oom()
65 let layout = Layout::new::<u64>(); in smoke_test_disallow_alloc_after_oom()
82 let layout = Layout::new::<u64>(); in smoke_test_allow_alloc_after_oom()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/gc/enabled/
H A Dfree_list.rs3 use core::{alloc::Layout, num::NonZeroU32, ops::Bound};
39 pub fn layout(size: usize) -> Layout { in layout() argument
40 Layout::from_size_align(size, ALIGN_USIZE).unwrap() in layout()
151 fn check_layout(&self, layout: Layout) -> Result<u32> { in check_layout()
236 pub fn alloc(&mut self, layout: Layout) -> Result<Option<NonZeroU32>> { in alloc()
263 pub fn dealloc(&mut self, index: NonZeroU32, layout: Layout) { in dealloc() argument
521 Alloc(Layout),
522 Dealloc(Layout),
570 Layout::from_size_align(size, align).unwrap() in arbitrary_layout()
858 let tests: &[fn(&mut FreeList, Layout)] = &[ in all_pairwise_alloc_dealloc_orderings()
[all …]
H A Dnull.rs18 use core::{alloc::Layout, any::Any, num::NonZeroU32};
126 fn alloc(&mut self, mut header: VMGcHeader, layout: Layout) -> Result<Result<VMGcRef, u64>> { in alloc()
258 let gc_ref = match self.alloc(VMGcHeader::externref(), Layout::new::<VMNullExternRef>())? { in alloc_externref()
285 fn alloc_raw(&mut self, header: VMGcHeader, layout: Layout) -> Result<Result<VMGcRef, u64>> { in alloc_raw()
/wasmtime-44.0.1/crates/test-programs/src/bin/
H A Dp2_cli_export_cabi_realloc.rs13 use std::alloc::{self, Layout}; in cabi_realloc()
20 layout = Layout::from_size_align_unchecked(new_len, align); in cabi_realloc()
24 layout = Layout::from_size_align_unchecked(old_len, align); in cabi_realloc()
H A Dasync_post_return_callee.rs4 alloc::{self, Layout},
27 let result = alloc::alloc(Layout::from_size_align(8, 4).unwrap()); in export_foo()
37 alloc::dealloc(ptr, Layout::from_size_align(8, 4).unwrap()); in export_post_return_foo()
H A Dasync_round_trip_stackful.rs24 std::alloc::{self, Layout},
66 let layout = Layout::from_size_align(8, 4).unwrap(); in export_foo()
H A Dasync_round_trip_many_stackful.rs24 std::alloc::{self, Layout},
79 let layout = Layout::from_size_align(128, 8).unwrap(); in export_foo()
/wasmtime-44.0.1/examples/min-platform/embedding/src/
H A Dallocator.rs15 use alloc::alloc::{GlobalAlloc, Layout};
37 unsafe fn alloc(&self, layout: Layout) -> *mut u8 { in alloc()
46 unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { in alloc_zeroed()
55 unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { in realloc() argument
64 unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { in dealloc() argument
/wasmtime-44.0.1/crates/core/src/error/
H A Dboxed.rs2 use core::alloc::Layout;
14 pub(crate) unsafe fn try_alloc(layout: Layout) -> Result<NonNull<u8>, OutOfMemory> { in try_alloc()
29 let layout = std_alloc::alloc::Layout::new::<MaybeUninit<T>>(); in try_new_uninit_box()
/wasmtime-44.0.1/cranelift/codegen/src/ir/
H A Dlayout.rs27 pub struct Layout { struct
43 impl Layout { argument
98 impl Layout { implementation
127 impl Layout { implementation
219 impl Layout { impl
373 layout: &'f Layout,
405 impl Layout { impl
620 layout: &'f Layout,
678 impl Serialize for Layout { implementation
717 type Value = Layout;
[all …]
H A Dfunction.rs12 JumpTableData, Layout, SigRef, Signature, SourceLocs, StackSlot, StackSlotData, StackSlots,
180 pub layout: Layout,
411 layout: Layout::new(), in with_name_signature()
/wasmtime-44.0.1/crates/core/src/
H A Dalloc.rs25 use core::{alloc::Layout, ptr::NonNull};
34 unsafe fn try_alloc(layout: Layout) -> Result<NonNull<u8>, OutOfMemory> { in try_alloc()
57 layout: Layout, in try_realloc() argument
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/sys/miri/
H A Dmmap.rs11 use std::alloc::{self, Layout};
145 fn make_layout(size: usize) -> Layout { in make_layout() argument
146 Layout::from_size_align(size, crate::runtime::vm::host_page_size()).unwrap() in make_layout()
/wasmtime-44.0.1/crates/wizer/benches/uap-bench/src/
H A Dlib.rs52 let layout = std::alloc::Layout::from_size_align(size, align).unwrap(); in alloc()
58 let layout = std::alloc::Layout::from_size_align(size, align).unwrap(); in dealloc()
/wasmtime-44.0.1/tests/all/
H A Dstack_creator.rs3 alloc::{GlobalAlloc, Layout, System},
43 layout: Layout,
55 let layout = Layout::from_size_align(size + page_size, page_size) in new()
/wasmtime-44.0.1/crates/environ/src/
H A Dgc.rs23 use core::alloc::Layout;
361 pub fn layout(&self, len: u32) -> Layout { in layout() argument
365 Layout::from_size_align(size, align).unwrap() in layout()
413 pub fn layout(&self) -> Layout { in layout() argument
416 Layout::from_size_align(size, align).unwrap() in layout()
/wasmtime-44.0.1/cranelift/codegen/src/
H A Dcursor.rs38 fn layout(&self) -> &ir::Layout; in layout() argument
41 fn layout_mut(&mut self) -> &mut ir::Layout; in layout_mut() argument
664 fn layout(&self) -> &ir::Layout { in layout() argument
668 fn layout_mut(&mut self) -> &mut ir::Layout { in layout_mut() argument
/wasmtime-44.0.1/crates/core/src/alloc/
H A Dstring.rs6 use std_alloc::{alloc::Layout, boxed::Box, string as inner};
236 let old_layout = Layout::array::<u8>(cap).unwrap(); in shrink_to_fit()
238 let new_layout = Layout::array::<u8>(len).unwrap(); in shrink_to_fit()
H A Dboxed.rs4 alloc::Layout,
15 let layout = Layout::new::<MaybeUninit<T>>(); in new_uninit_box()
93 let layout = Layout::array::<MaybeUninit<T>>(len) in new_uninit_boxed_slice()
180 let old_layout = Layout::array::<T>(cap).expect( in shrink_to_fit()
183 let new_layout = Layout::array::<T>(len) in shrink_to_fit()
H A Dvec.rs13 use std_alloc::alloc::Layout;
286 let layout = Layout::array::<T>(cap).unwrap(); in shrink_to_fit()
287 let new_size = Layout::array::<T>(len).unwrap().size(); in shrink_to_fit()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/
H A Dmmap_vec.rs8 use alloc::alloc::Layout;
40 layout: Layout,
70 let layout = Layout::from_size_align(len, alignment) in new_alloc()
H A Dgc.rs28 use core::{alloc::Layout, num::NonZeroU32};
262 layout: Layout, in alloc_raw() argument
/wasmtime-44.0.1/crates/fuzzing/src/
H A Doom.rs78 unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 { in alloc()
161 unsafe fn dealloc(&self, ptr: *mut u8, layout: std::alloc::Layout) { in dealloc() argument
/wasmtime-44.0.1/cranelift/jit/src/memory/
H A Dsystem.rs56 let layout = alloc::Layout::from_size_align(alloc_size, page_size).unwrap(); in with_size()
102 let layout = alloc::Layout::from_size_align(self.len, page_size).unwrap(); in drop()
/wasmtime-44.0.1/crates/wiggle/generate/src/types/
H A Dhandle.rs5 use witx::Layout;

12