| /wasmtime-44.0.1/crates/fuzzing/tests/oom/ |
| H A D | smoke.rs | 2 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 D | free_list.rs | 3 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 D | null.rs | 18 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 D | p2_cli_export_cabi_realloc.rs | 13 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 D | async_post_return_callee.rs | 4 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 D | async_round_trip_stackful.rs | 24 std::alloc::{self, Layout}, 66 let layout = Layout::from_size_align(8, 4).unwrap(); in export_foo()
|
| H A D | async_round_trip_many_stackful.rs | 24 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 D | allocator.rs | 15 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 D | boxed.rs | 2 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 D | layout.rs | 27 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 D | function.rs | 12 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 D | alloc.rs | 25 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 D | mmap.rs | 11 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 D | lib.rs | 52 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 D | stack_creator.rs | 3 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 D | gc.rs | 23 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 D | cursor.rs | 38 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 D | string.rs | 6 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 D | boxed.rs | 4 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 D | vec.rs | 13 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 D | mmap_vec.rs | 8 use alloc::alloc::Layout; 40 layout: Layout, 70 let layout = Layout::from_size_align(len, alignment) in new_alloc()
|
| H A D | gc.rs | 28 use core::{alloc::Layout, num::NonZeroU32}; 262 layout: Layout, in alloc_raw() argument
|
| /wasmtime-44.0.1/crates/fuzzing/src/ |
| H A D | oom.rs | 78 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 D | system.rs | 56 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 D | handle.rs | 5 use witx::Layout;
|