Home
last modified time | relevance | path

Searched refs:alloc (Results 1 – 25 of 252) sorted by relevance

1234567891011

/wasmtime-44.0.1/tests/misc_testsuite/gc/
H A Dfunc-refs-in-gc-heap.wast20 (func $alloc-s0 (export "alloc-s0") (result (ref $s0))
24 (func $alloc-s1 (export "alloc-s1") (result (ref $s1))
28 (func $alloc-s2 (export "alloc-s2") (result (ref $s2))
33 (table.set (i32.const 0) (struct.get $s0 0 (call $alloc-s0)))
38 (table.set (i32.const 0) (struct.get $s1 0 (call $alloc-s1)))
49 (local.set $s (call $alloc-s0))
57 (local.set $s (call $alloc-s1))
65 (local.set $s (call $alloc-s2))
72 (assert_return (invoke "alloc-s0") (ref.struct))
73 (assert_return (invoke "alloc-s1") (ref.struct))
[all …]
H A Dalloc-v128-struct.wast6 (func (export "alloc")
12 (assert_return (invoke "alloc"))
/wasmtime-44.0.1/crates/environ/src/
H A Dprelude.rs28 pub use alloc::borrow::ToOwned;
29 pub use alloc::boxed::Box;
30 pub use alloc::format;
31 pub use alloc::string::{String, ToString};
32 pub use alloc::vec;
33 pub use alloc::vec::Vec;
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/gc/enabled/
H A Dfree_list.rs2 use alloc::collections::BTreeMap;
645 .alloc(layout) in dealloc_merge_prev_and_next()
655 .alloc(layout) in dealloc_merge_prev_and_next()
692 .alloc(layout) in dealloc_merge_with_prev_and_not_next()
696 .alloc(layout) in dealloc_merge_with_prev_and_not_next()
700 .alloc(layout) in dealloc_merge_with_prev_and_not_next()
739 .alloc(layout) in dealloc_merge_with_next_and_not_prev()
743 .alloc(layout) in dealloc_merge_with_next_and_not_prev()
747 .alloc(layout) in dealloc_merge_with_next_and_not_prev()
786 .alloc(layout) in dealloc_no_merge()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/
H A Dindex_allocator.rs38 pub fn alloc(&self) -> Option<SlotId> { in alloc() method
39 self.0.alloc(None) in alloc()
549 assert!(state.alloc(None).is_none()); in test_next_available_allocation_strategy()
590 assert!(state.alloc(None).is_none()); in test_affinity_allocation_strategy()
605 let index = state.alloc(Some(id1)).unwrap(); in test_affinity_allocation_strategy()
724 state.alloc(Some(MemoryInModule( in test_affinity_threshold()
733 state.alloc(Some(MemoryInModule( in test_affinity_threshold()
742 state.alloc(Some(MemoryInModule( in test_affinity_threshold()
761 let a = allocator.alloc().unwrap(); in test_freelist()
765 assert_eq!(allocator.alloc(), Some(a)); in test_freelist()
[all …]
/wasmtime-44.0.1/crates/wizer/benches/uap-bench/src/
H A Dlib.rs51 pub extern "C" fn alloc(size: usize, align: usize) -> *mut u8 { in alloc() function
52 let layout = std::alloc::Layout::from_size_align(size, align).unwrap(); in alloc()
53 unsafe { std::alloc::alloc(layout) } in alloc()
58 let layout = std::alloc::Layout::from_size_align(size, align).unwrap(); in dealloc()
60 std::alloc::dealloc(ptr, layout); in dealloc()
/wasmtime-44.0.1/crates/fuzzing/src/
H A Doom.rs8 alloc::GlobalAlloc,
78 unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 { in alloc() method
96 ptr = unsafe { std::alloc::System.alloc(layout) }; in alloc()
109 ptr = unsafe { std::alloc::System.alloc(layout) }; in alloc()
137 ptr = unsafe { std::alloc::System.alloc(layout) }; in alloc()
161 unsafe fn dealloc(&self, ptr: *mut u8, layout: std::alloc::Layout) { in dealloc()
163 std::alloc::System.dealloc(ptr, layout); in dealloc()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/
H A Dmemory.rs84 use alloc::sync::Arc;
568 alloc: Box<dyn RuntimeLinearMemory>, field
583 alloc: Box<dyn RuntimeLinearMemory>, in new()
597 let mmap_base = match alloc.base() { in new()
618 alloc, in new()
641 let old_byte_size = self.alloc.byte_size(); in grow()
712 self.alloc.set_byte_size(new_byte_size); in grow()
722 self.alloc.grow_to(new_byte_size) in grow()
749 self.alloc.vmmemory() in vmmemory()
753 self.alloc.byte_size() in byte_size()
[all …]
H A Dmmap_vec.rs8 use alloc::alloc::Layout;
9 use alloc::sync::Arc;
72 match NonNull::new(unsafe { alloc::alloc::alloc_zeroed(layout.clone()) }) { in new_alloc()
348 alloc::alloc::dealloc(base.as_mut(), layout.clone()); in drop()
/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()
21 alloc::alloc(layout) in cabi_realloc()
25 alloc::realloc(old_ptr, layout, new_len) in cabi_realloc()
H A Dasync_round_trip_many_stackful.rs24 std::alloc::{self, Layout},
81 let params = alloc::alloc(layout); in export_foo()
86 let results = alloc::alloc(layout); in export_foo()
110 alloc::dealloc(params, layout); in export_foo()
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},
68 let results = alloc::alloc(layout); in export_foo()
98 alloc::dealloc(results, layout); in export_foo()
/wasmtime-44.0.1/crates/core/src/error/
H A Dboxed.rs2 use core::alloc::Layout;
17 let ptr = unsafe { std_alloc::alloc::alloc(layout) }; in try_alloc()
29 let layout = std_alloc::alloc::Layout::new::<MaybeUninit<T>>(); in try_new_uninit_box()
/wasmtime-44.0.1/crates/core/src/
H A Dalloc.rs25 use core::{alloc::Layout, ptr::NonNull};
37 let ptr = unsafe { std_alloc::alloc::alloc(layout) }; in try_alloc()
63 let ptr = unsafe { std_alloc::alloc::realloc(ptr, layout, new_size) }; in try_realloc()
H A Dlib.rs16 extern crate alloc as std_alloc;
21 pub mod alloc; module
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/gc/
H A Dhost_data.rs19 alloc::PanicOnOom,
44 pub fn alloc(&mut self, value: Box<dyn Any + Send + Sync>) -> ExternRefHostDataId { in alloc() method
46 let id = self.slab.alloc(value).panic_on_oom(); in alloc()
80 let id = table.alloc(Box::new(x)); in correct_dyn_object()
/wasmtime-44.0.1/crates/wasi-preview1-component-adapter/src/
H A Dlib.rs212 ptr = unsafe { alloc.alloc(old_ptr, old_size, align, new_size) }; in cabi_import_realloc()
318 unsafe fn alloc( in alloc() method
392 let ret = alloc.alloc(align, size); in alloc()
405 alloc, in alloc()
409 alloc.clone().alloc(align, size) in alloc()
411 alloc.alloc(align, size) in alloc()
419 alloc.alloc(align, size) in alloc()
421 alloc.clone().alloc(align, size) in alloc()
424 alloc.alloc(align, size) in alloc()
533 let (len, alloc) = state.with_import_alloc(alloc, || unsafe { in args_sizes_get()
[all …]
/wasmtime-44.0.1/cranelift/jit/src/memory/
H A Darena.rs97 alloc: ManuallyDrop<Option<region::Allocation>>, field
114 let mut alloc = region::alloc(size, region::Protection::NONE)?; in new_with_size() localVariable
115 let ptr = alloc.as_mut_ptr(); in new_with_size()
118 alloc: ManuallyDrop::new(Some(alloc)), in new_with_size()
204 let _: Option<region::Allocation> = self.alloc.take(); in free_memory()
H A Dsystem.rs7 use std::alloc;
56 let layout = alloc::Layout::from_size_align(alloc_size, page_size).unwrap(); in with_size()
58 let ptr = unsafe { alloc::alloc(layout) }; in with_size()
102 let layout = alloc::Layout::from_size_align(self.len, page_size).unwrap(); in drop()
106 alloc::dealloc(self.ptr, layout) in drop()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/sys/miri/
H A Dmmap.rs11 use std::alloc::{self, Layout};
52 let ptr = unsafe { alloc::alloc(layout) }; in reserve()
140 alloc::dealloc(self.as_send_sync_ptr().as_ptr(), layout); in drop()
/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() method
84 fn alloc(&self, _size: usize) -> (*mut u8, usize, u32) { in alloc() method
/wasmtime-44.0.1/crates/fuzzing/tests/oom/
H A Dsmoke.rs2 alloc::{Layout, alloc, dealloc},
35 let ptr = unsafe { alloc(layout) }; in new()
/wasmtime-44.0.1/crates/wasi-io/src/
H A Dstreams.rs2 use alloc::boxed::Box;
98 impl alloc::fmt::Display for StreamError {
99 fn fmt(&self, f: &mut alloc::fmt::Formatter<'_>) -> alloc::fmt::Result { in fmt()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/
H A Dmod.rs159 pub use alloc::boxed::Box;
160 pub use alloc::string::String;
161 pub use alloc::vec::Vec;

1234567891011