Home
last modified time | relevance | path

Searched refs:OutOfMemory (Results 1 – 25 of 70) sorted by relevance

123

/wasmtime-44.0.1/crates/core/src/error/
H A Doom.rs17 pub struct OutOfMemory { struct
23 unsafe impl Send for OutOfMemory {} argument
27 unsafe impl Sync for OutOfMemory {} implementation
29 impl fmt::Debug for OutOfMemory { implementation
40 impl fmt::Display for OutOfMemory { implementation
50 impl core::error::Error for OutOfMemory { implementation
57 impl OutOfMemory { impl
65 assert!(mem::size_of::<OutOfMemory>() == mem::size_of::<Error>());
67 assert!(mem::align_of::<OutOfMemory>() == mem::align_of::<Error>());
130 impl From<OutOfMemory> for OomOrDynError {
[all …]
H A Dboxed.rs1 use super::{OutOfMemory, Result};
14 pub(crate) unsafe fn try_alloc(layout: Layout) -> Result<NonNull<u8>, OutOfMemory> { in try_alloc() argument
22 Err(OutOfMemory::new(layout.size())) in try_alloc()
28 pub(crate) fn try_new_uninit_box<T>() -> Result<Box<MaybeUninit<T>>, OutOfMemory> { in try_new_uninit_box() argument
H A Derror.rs5 use crate::error::{OutOfMemory, Result};
136 fn new<E>(mut error: E) -> Result<Self, OutOfMemory> in new()
592 if TypeId::of::<E>() == TypeId::of::<OutOfMemory>() { in new()
597 oom: OutOfMemory, in new()
1496 Oom(&'a OutOfMemory),
1504 Oom(&'a mut OutOfMemory),
1527 assert_send_sync::<OutOfMemory>();
1605 unsafe fn unchecked_oom(&self) -> &OutOfMemory { in unchecked_oom() argument
1674 let boxed = try_new_uninit_box::<OutOfMemory>()?; in into_boxed_dyn_core_error()
1984 let mut error = Error::from(OutOfMemory::new(5)); in from_oom()
[all …]
/wasmtime-44.0.1/crates/core/src/alloc/
H A Dtry_clone.rs1 use crate::error::OutOfMemory;
10 fn try_clone(&self) -> Result<Self, OutOfMemory>; in try_clone() argument
24 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
34 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
44 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
55 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
68 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
78 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
88 fn try_clone(&self) -> Result<Self, OutOfMemory> {
111 fn try_clone(&self) -> Result<Self, OutOfMemory> {
[all …]
H A Dtry_collect.rs2 use crate::error::OutOfMemory;
32 impl<T> TryFromIterator<T, OutOfMemory> for TryVec<T> {
33 fn try_from_iter<I>(iter: I) -> Result<Self, OutOfMemory> in try_from_iter()
45 impl<T> TryFromIterator<T, OutOfMemory> for Box<[T]> {
46 fn try_from_iter<I>(iter: I) -> Result<Self, OutOfMemory> in try_from_iter()
57 E: From<OutOfMemory>,
73 E: From<OutOfMemory>,
113 use crate::error::{OutOfMemory, Result};
116 fn test_vec_collect() -> Result<(), OutOfMemory> { in test_vec_collect()
123 fn test_box_collect() -> Result<(), OutOfMemory> { in test_box_collect()
[all …]
H A Dboxed.rs2 use crate::{alloc::str_ptr_from_slice_ptr, error::OutOfMemory};
36 fn try_new(value: T) -> Result<Self, OutOfMemory> in try_new()
49 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
259 Oom(OutOfMemory),
265 pub fn unwrap_oom(&self) -> OutOfMemory { in unwrap_oom() argument
279 impl From<OutOfMemory> for TooFewItemsOrOom {
280 fn from(oom: OutOfMemory) -> Self { in from()
358 Oom(OutOfMemory),
362 fn from(oom: OutOfMemory) -> Self { in from()
390 pub fn flatten(self) -> OutOfMemory { in flatten() argument
[all …]
H A Dstring.rs3 error::OutOfMemory,
16 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
126 pub fn with_capacity(capacity: usize) -> Result<Self, OutOfMemory> { in with_capacity() argument
147 pub fn reserve(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve() argument
150 .map_err(|_| OutOfMemory::new(self.len().saturating_add(additional))) in reserve()
156 pub fn reserve_exact(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve_exact() argument
159 .map_err(|_| OutOfMemory::new(self.len().saturating_add(additional))) in reserve_exact()
165 pub fn push(&mut self, c: char) -> Result<(), OutOfMemory> { in push() argument
174 pub fn push_str(&mut self, s: &str) -> Result<(), OutOfMemory> { in push_str() argument
210 pub fn shrink_to_fit(&mut self) -> Result<(), OutOfMemory> { in shrink_to_fit() argument
[all …]
H A Dvec.rs2 use crate::error::OutOfMemory;
74 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
93 pub fn with_capacity(capacity: usize) -> Result<Self, OutOfMemory> { in with_capacity() argument
102 pub fn from_elem(elem: T, len: NonZeroUsize) -> Result<Self, OutOfMemory> in from_elem()
120 pub fn reserve(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve() argument
122 OutOfMemory::new( in reserve()
155 pub fn push(&mut self, value: T) -> Result<(), OutOfMemory> { in push() argument
262 pub fn shrink_to_fit(&mut self) -> Result<(), OutOfMemory> { in shrink_to_fit() argument
314 pub fn into_boxed_slice(mut self) -> Result<Box<[T]>, OutOfMemory> { in into_boxed_slice() argument
499 use crate::error::OutOfMemory;
[all …]
H A Dtry_new.rs1 use crate::error::OutOfMemory;
17 pub fn try_new<T>(value: T::Value) -> Result<T, OutOfMemory> in try_new()
32 fn try_new(value: Self::Value) -> Result<Self, OutOfMemory> in try_new()
H A Dtry_cow.rs12 fn try_to_owned(&self) -> Result<Self::Owned, OutOfMemory>; in try_to_owned() argument
18 fn try_to_owned(&self) -> Result<Self::Owned, OutOfMemory> { in try_to_owned() argument
31 fn try_to_owned(&self) -> Result<Self::Owned, OutOfMemory> { in try_to_owned() argument
46 fn try_to_owned(&self) -> Result<Self::Owned, OutOfMemory> { in try_to_owned() argument
98 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
188 pub fn to_mut(&mut self) -> Result<&mut <B as TryToOwned>::Owned, OutOfMemory> { in to_mut() argument
200 pub fn into_owned(self) -> Result<<B as TryToOwned>::Owned, OutOfMemory> { in into_owned() argument
H A Darc.rs2 use crate::error::OutOfMemory;
12 fn try_new(value: T) -> Result<Self, OutOfMemory> in try_new()
22 OutOfMemory::new(bytes) in try_new()
/wasmtime-44.0.1/crates/core/src/
H A Dalloc.rs24 use crate::error::OutOfMemory;
34 unsafe fn try_alloc(layout: Layout) -> Result<NonNull<u8>, OutOfMemory> { in try_alloc() argument
42 Err(OutOfMemory::new(layout.size())) in try_alloc()
59 ) -> Result<NonNull<u8>, OutOfMemory> { in try_realloc() argument
68 Err(OutOfMemory::new(new_size)) in try_realloc()
85 impl<T> PanicOnOom for Result<T, OutOfMemory> {
H A Dslab.rs137 use crate::error::OutOfMemory;
265 pub fn with_capacity(capacity: usize) -> Result<Self, OutOfMemory> { in with_capacity() argument
277 pub fn reserve(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve() argument
295 fn double_capacity(&mut self) -> Result<(), OutOfMemory> { in double_capacity() argument
366 pub fn alloc(&mut self, value: T) -> Result<Id, OutOfMemory> { in alloc() argument
380 fn alloc_slow(&mut self, value: T) -> Result<Id, OutOfMemory> { in alloc_slow() argument
/wasmtime-44.0.1/crates/wasmtime/src/runtime/store/
H A Dfunc_refs.rs94 ) -> Result<NonNull<VMFuncRef>, OutOfMemory> { in push() argument
100 .map_err(|_| OutOfMemory::new(size_of::<VMFuncRef>()))?; in push()
118 pub fn reserve_storage(&mut self, amt: usize) -> Result<(), OutOfMemory> { in reserve_storage() argument
129 ) -> Result<(), OutOfMemory> { in push_instance_pre_func_refs() argument
141 ) -> Result<(), OutOfMemory> { in push_instance_pre_definitions() argument
161 ) -> Result<NonNull<VMFuncRef>, OutOfMemory> { in push_arc_host() argument
174 ) -> Result<NonNull<VMFuncRef>, OutOfMemory> { in push_box_host() argument
/wasmtime-44.0.1/crates/core/tests/
H A Dtests.rs177 assert!(!e.is::<OutOfMemory>()); in is()
183 assert!(!e.is::<OutOfMemory>()); in is()
190 assert!(!e.is::<OutOfMemory>()); in is()
196 assert!(!e.is::<OutOfMemory>()); in is()
200 assert!(e.is::<OutOfMemory>()); in is()
438 .context(OutOfMemory::new(5)); in downcast()
445 .context(OutOfMemory::new(5)); in downcast()
452 .context(OutOfMemory::new(5)); in downcast()
560 assert!(error.is::<OutOfMemory>()); in context_on_oom()
897 let oom = OutOfMemory::new(bytes); in oom_requested_allocation_size()
[all …]
/wasmtime-44.0.1/crates/environ/src/collections/
H A Dentity_set.rs2 use wasmtime_core::error::OutOfMemory;
26 pub fn with_capacity(capacity: usize) -> Result<Self, OutOfMemory> { in with_capacity() argument
33 pub fn ensure_capacity(&mut self, capacity: usize) -> Result<(), OutOfMemory> { in ensure_capacity() argument
69 pub fn insert(&mut self, k: K) -> Result<bool, OutOfMemory> { in insert() argument
H A Dhash_set.rs1 use crate::error::OutOfMemory;
72 pub fn with_capacity(capacity: usize) -> Result<Self, OutOfMemory> { in with_capacity() argument
141 pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> Result<Self, OutOfMemory> { in with_capacity_and_hasher() argument
149 pub fn reserve(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve() argument
151 OutOfMemory::new( in reserve()
179 pub fn insert(&mut self, value: T) -> Result<bool, OutOfMemory> { in insert() argument
H A Dhash_map.rs1 use crate::error::OutOfMemory;
28 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
93 pub fn with_capacity(capacity: usize) -> Result<Self, OutOfMemory> { in with_capacity() argument
172 pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> Result<Self, OutOfMemory> { in with_capacity_and_hasher() argument
180 pub fn reserve(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve() argument
183 OutOfMemory::new( in reserve()
211 pub fn insert(&mut self, key: K, value: V) -> Result<Option<V>, OutOfMemory> { in insert() argument
H A Dindex_map.rs1 use crate::{collections::TryClone, error::OutOfMemory};
31 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
137 pub fn with_capacity(n: usize) -> Result<Self, OutOfMemory> { in with_capacity() argument
242 pub fn split_off(&mut self, at: usize) -> Result<Self, OutOfMemory> in split_off()
257 pub fn reserve(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve() argument
260 OutOfMemory::new( in reserve()
273 OutOfMemory::new( in reserve_exact()
318 ) -> Result<(usize, Option<V>), OutOfMemory> in insert_sorted_by()
333 ) -> Result<(usize, Option<V>), OutOfMemory> in insert_sorted_by_key()
349 ) -> Result<(usize, Option<V>), OutOfMemory> { in insert_before() argument
[all …]
H A Dprimary_map.rs1 use crate::error::OutOfMemory;
95 pub fn with_capacity(capacity: usize) -> Result<Self, OutOfMemory> { in with_capacity() argument
173 pub fn push(&mut self, v: V) -> Result<K, OutOfMemory> { in push() argument
189 pub fn reserve(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve() argument
194 pub fn reserve_exact(&mut self, additional: usize) -> Result<(), OutOfMemory> { in reserve_exact() argument
225 fn try_extend<I>(&mut self, iter: I) -> Result<(), OutOfMemory> in try_extend()
/wasmtime-44.0.1/crates/fuzzing/tests/oom/
H A Dsmoke.rs5 use wasmtime::{Result, error::OutOfMemory};
69 Err(OutOfMemory::new(layout.size()).into()) in smoke_test_disallow_alloc_after_oom()
86 Err(OutOfMemory::new(layout.size()).into()) in smoke_test_allow_alloc_after_oom()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/
H A Dstore_box.rs1 use crate::error::OutOfMemory;
19 pub fn new(val: T) -> Result<StoreBox<T>, OutOfMemory> { in new() argument
/wasmtime-44.0.1/crates/wasi/src/p3/sockets/
H A Dconv.rs164 std::io::ErrorKind::OutOfMemory => Self::OutOfMemory, in from()
206 Errno::NOMEM => Self::OutOfMemory, in from()
207 Errno::NOBUFS => Self::OutOfMemory, in from()
232 crate::sockets::util::ErrorCode::OutOfMemory => Self::OutOfMemory, in from()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/
H A Dtype_registry.rs7 use crate::error::OutOfMemory;
120 ) -> Result<TypeCollection, OutOfMemory> in register_and_canonicalize_types()
280 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
466 fn try_clone(&self) -> Result<Self, OutOfMemory> { in try_clone() argument
687 OutOfMemory, in register_module_types() argument
757 ) -> Result<RecGroupEntry, OutOfMemory> { in register_rec_group()
816 ) -> Result<RecGroupEntry, OutOfMemory> { in register_new_rec_group() argument
916 ) -> Result<(), OutOfMemory> { in insert_entry_types() argument
1007 ) -> Result<(), OutOfMemory> { in insert_entry_trampolines() argument
1095 ) -> Result<(), OutOfMemory> { in insert_entry_gc_layouts() argument
[all …]
H A Dfunc.rs1 use crate::error::OutOfMemory;
396 ) -> Result<Self, OutOfMemory> { in try_new_() argument
1652 ) -> Result<FuncType, OutOfMemory>; in func_type() argument
1695 ) -> Result<FuncType, OutOfMemory> { in func_type() argument
1738 ) -> Result<FuncType, OutOfMemory> { in func_type() argument
1796 ) -> Result<FuncType, OutOfMemory> {
1828 fn into_func(self, engine: &Engine) -> Result<HostFunc, OutOfMemory>; in into_func() argument
2251 ) -> Result<StoreBox<VMArrayCallHostFuncContext>, OutOfMemory> in vmctx_sync()
2286 ) -> Result<StoreBox<VMArrayCallHostFuncContext>, OutOfMemory> in vmctx_async()
2416 ) -> Result<Self, OutOfMemory> in new_unchecked()
[all …]

123