Home
last modified time | relevance | path

Searched refs:AllocError (Results 1 – 8 of 8) sorted by relevance

/openbmc/linux/rust/alloc/
H A Dalloc.rs178 fn alloc_impl(&self, layout: Layout, zeroed: bool) -> Result<NonNull<[u8]>, AllocError> { in alloc_impl() argument
184 let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; in alloc_impl()
198 ) -> Result<NonNull<[u8]>, AllocError> { in grow_impl() argument
216 let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; in grow_impl()
242 fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> { in allocate() argument
247 fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> { in allocate_zeroed() argument
266 ) -> Result<NonNull<[u8]>, AllocError> { in grow() argument
277 ) -> Result<NonNull<[u8]>, AllocError> { in grow_zeroed() argument
288 ) -> Result<NonNull<[u8]>, AllocError> { in shrink() argument
307 let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; in shrink()
H A Draw_vec.rs224 let ptr = result.map_err(|_| AllocError { layout, non_exhaustive: () })?; in try_allocate_in()
490 .map_err(|_| AllocError { layout: new_layout, non_exhaustive: () })? in shrink()
527 memory.map_err(|_| AllocError { layout: new_layout, non_exhaustive: () }.into()) in finish_grow()
545 Err(AllocError { layout, .. }) => handle_alloc_error(layout), in handle_reserve()
H A Dboxed.rs172 use crate::alloc::{AllocError, Allocator, Global, Layout};
306 pub fn try_new(x: T) -> Result<Self, AllocError> { in try_new() argument
333 pub fn try_new_uninit() -> Result<Box<mem::MaybeUninit<T>>, AllocError> { in try_new_uninit()
359 pub fn try_new_zeroed() -> Result<Box<mem::MaybeUninit<T>>, AllocError> { in try_new_zeroed()
410 pub fn try_new_in(x: T, alloc: A) -> Result<Self, AllocError> in try_new_in()
482 pub fn try_new_uninit_in(alloc: A) -> Result<Box<mem::MaybeUninit<T>, A>, AllocError> in try_new_uninit_in()
556 pub fn try_new_zeroed_in(alloc: A) -> Result<Box<mem::MaybeUninit<T>, A>, AllocError> in try_new_zeroed_in()
689 pub fn try_new_uninit_slice(len: usize) -> Result<Box<[mem::MaybeUninit<T>]>, AllocError> { in try_new_uninit_slice() argument
695 Err(_) => return Err(AllocError), in try_new_uninit_slice()
723 pub fn try_new_zeroed_slice(len: usize) -> Result<Box<[mem::MaybeUninit<T>]>, AllocError> { in try_new_zeroed_slice() argument
[all …]
/openbmc/linux/rust/kernel/sync/
H A Darc.rs27 alloc::AllocError,
165 pub fn try_new(contents: T) -> Result<Self, AllocError> { in try_new() argument
519 pub fn try_new(value: T) -> Result<Self, AllocError> { in try_new() argument
527 pub fn try_new_uninit() -> Result<UniqueArc<MaybeUninit<T>>, AllocError> { in try_new_uninit()
529 let inner = Box::try_init::<AllocError>(try_init!(ArcInner { in try_new_uninit()
532 data <- init::uninit::<T, AllocError>(), in try_new_uninit()
533 }? AllocError))?; in try_new_uninit()
/openbmc/linux/rust/kernel/
H A Dstr.rs5 use alloc::alloc::AllocError;
206 pub fn to_cstring(&self) -> Result<CString, AllocError> { in to_cstring() argument
597 type Error = AllocError;
599 fn try_from(cstr: &'a CStr) -> Result<CString, AllocError> { in try_from() argument
603 .map_err(|_| AllocError)?; in try_from()
H A Dinit.rs219 alloc::AllocError,
1120 E: From<AllocError>; in try_pin_init() argument
1140 E: From<AllocError>; in try_init() argument
1159 E: From<AllocError>, in try_pin_init() argument
1173 E: From<AllocError>, in try_init() argument
1189 E: From<AllocError>, in try_pin_init() argument
1203 E: From<AllocError>, in try_init() argument
H A Derror.rs10 alloc::{AllocError, LayoutError},
177 impl From<AllocError> for Error {
178 fn from(_: AllocError) -> Error { in from()
/openbmc/linux/rust/alloc/collections/
H A Dmod.rs94 AllocError { enumerator
143 TryReserveErrorKind::AllocError { .. } => { in fmt()