Home
last modified time | relevance | path

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

/linux/rust/kernel/
H A Dmaple_tree.rs192 InsertErrorKind::AllocError(kernel::alloc::AllocError) in insert_range()
446 ) -> Result<usize, AllocError<T>> in alloc_range()
451 return Err(AllocError { in alloc_range()
478 AllocErrorKind::AllocError(kernel::alloc::AllocError) in alloc_range()
484 Err(AllocError { value, cause }) in alloc_range()
598 AllocError(kernel::alloc::AllocError), enumerator
608 InsertErrorKind::AllocError(kernel::alloc::AllocError) => ENOMEM, in from()
622 pub struct AllocError<T> { struct
635 AllocError(kernel::alloc::AllocError), enumerator
645 AllocErrorKind::AllocError(kernel::alloc::AllocError) => ENOMEM, in from()
[all …]
H A Dcpumask.rs8 alloc::{AllocError, Flags},
225 pub fn new_zero(_flags: Flags) -> Result<Self, AllocError> { in new_zero() argument
236 NonNull::new(ptr.cast()).ok_or(AllocError)? in new_zero()
250 pub unsafe fn new(_flags: Flags) -> Result<Self, AllocError> { in new() argument
261 NonNull::new(ptr.cast()).ok_or(AllocError)? in new()
H A Dbitmap.rs9 use crate::alloc::{AllocError, Flags};
248 pub fn new(nbits: usize, flags: Flags) -> Result<Self, AllocError> { in new() argument
256 return Err(AllocError); in new()
261 let ptr = NonNull::new(ptr).ok_or(AllocError)?; in new()
529 fn bitmap_vec_new() -> Result<(), AllocError> { in bitmap_vec_new()
546 fn bitmap_set_clear_find() -> Result<(), AllocError> { in bitmap_set_clear_find()
576 fn owned_bitmap_out_of_bounds() -> Result<(), AllocError> { in owned_bitmap_out_of_bounds()
604 fn bitmap_copy_and_extend() -> Result<(), AllocError> { in bitmap_copy_and_extend()
H A Dstr.rs6 alloc::{flags::*, AllocError, KVec},
231 fn to_cstring(&self) -> Result<CString, AllocError>; in to_cstring() argument
264 fn to_ascii_lowercase(&self) -> Result<CString, AllocError>; in to_ascii_lowercase() argument
275 fn to_ascii_uppercase(&self) -> Result<CString, AllocError>; in to_ascii_uppercase() argument
341 fn to_cstring(&self) -> Result<CString, AllocError> { in to_cstring() argument
355 fn to_ascii_lowercase(&self) -> Result<CString, AllocError> { in to_ascii_lowercase() argument
363 fn to_ascii_uppercase(&self) -> Result<CString, AllocError> { in to_ascii_uppercase() argument
868 type Error = AllocError;
870 fn try_from(cstr: &'a CStr) -> Result<CString, AllocError> { in try_from() argument
H A Dinit.rs129 alloc::{AllocError, Flags},
148 E: From<AllocError>; in try_pin_init() argument
168 E: From<AllocError>; in try_init() argument
H A Did_pool.rs7 use crate::alloc::{AllocError, Flags};
89 pub fn realloc(&self, flags: Flags) -> Result<PoolResizer, AllocError> { in realloc() argument
114 pub fn with_capacity(num_ids: usize, flags: Flags) -> Result<Self, AllocError> { in with_capacity() argument
H A Dalloc.rs23 pub struct AllocError; struct
184 fn alloc(layout: Layout, flags: Flags, nid: NumaNode) -> Result<NonNull<[u8]>, AllocError> { in alloc() argument
236 ) -> Result<NonNull<[u8]>, AllocError>; in realloc() argument
H A Dpage.rs6 alloc::{AllocError, Flags},
168 /// # Ok::<(), kernel::alloc::AllocError>(())
177 /// # Ok::<(), kernel::alloc::AllocError>(()) in nid()
180 pub fn alloc_page(flags: Flags) -> Result<Self, AllocError> {
184 let page = NonNull::new(page).ok_or(AllocError)?;
158 alloc_page(flags: Flags) -> Result<Self, AllocError> alloc_page() argument
H A Derror.rs10 alloc::{layout::LayoutError, AllocError},
218 impl From<AllocError> for Error {
219 fn from(_: AllocError) -> Error { in from()
H A Dworkqueue.rs189 alloc::{AllocError, Flags},
338 ) -> Result<(), AllocError> { in try_spawn() argument
344 self.enqueue(KBox::pin_init(init, flags).map_err(|_| AllocError)?); in try_spawn()
/linux/rust/pin-init/src/
H A Dalloc.rs6 use core::alloc::AllocError;
12 type AllocError = core::convert::Infallible; typedef
32 E: From<AllocError>; in try_pin_init() argument
38 fn pin_init(init: impl PinInit<T>) -> Result<Pin<Self>, AllocError> { in pin_init() argument
52 E: From<AllocError>; in try_init() argument
55 fn init(init: impl Init<T>) -> Result<Self, AllocError> { in init() argument
84 E: From<AllocError>, in try_pin_init() argument
92 E: From<AllocError>, in try_init() argument
102 E: From<AllocError>, in try_pin_init() argument
120 E: From<AllocError>, in try_init() argument
/linux/rust/kernel/alloc/
H A Dallocator.rs16 use crate::alloc::{AllocError, Allocator, NumaNode};
91 ) -> Result<NonNull<[u8]>, AllocError> { in call() argument
120 NonNull::new(raw_ptr).ok_or(AllocError)? in call()
152 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
222 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
243 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
H A Dkvec.rs8 AllocError, Allocator, Box, Flags, NumaNode,
325 pub fn push(&mut self, v: T, flags: Flags) -> Result<(), AllocError> { in push() argument
501 pub fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> { in with_capacity() argument
622 pub fn reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError> { in reserve() argument
632 return Err(AllocError); in reserve()
637 let new_cap = core::cmp::max(cap * 2, len.checked_add(additional).ok_or(AllocError)?); in reserve()
638 let layout = ArrayLayout::new(new_cap).map_err(|_| AllocError)?; in reserve()
740 pub fn extend_with(&mut self, n: usize, value: T, flags: Flags) -> Result<(), AllocError> { in extend_with() argument
779 pub fn extend_from_slice(&mut self, other: &[T], flags: Flags) -> Result<(), AllocError> { in extend_from_slice() argument
795 pub fn from_elem(value: T, n: usize, flags: Flags) -> Result<Self, AllocError> { in from_elem() argument
[all …]
H A Dkbox.rs7 use super::{AllocError, Allocator, Flags, NumaNode};
256 pub fn new(x: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
275 pub fn new_uninit(flags: Flags) -> Result<Box<MaybeUninit<T>, A>, AllocError> { in new_uninit() argument
287 pub fn pin(x: T, flags: Flags) -> Result<Pin<Box<T, A>>, AllocError> in pin()
344 E: From<AllocError>, in pin_slice() argument
467 E: From<AllocError>, in try_pin_init() argument
475 E: From<AllocError>, in try_init() argument
/linux/rust/pin-init/examples/
H A Derror.rs8 use std::alloc::AllocError;
20 impl From<AllocError> for Error {
21 fn from(_: AllocError) -> Self { in from()
H A Dpthread_mutex.rs11 use core::alloc::AllocError;
58 impl From<AllocError> for Error {
59 fn from(_: AllocError) -> Self { in from()
/linux/rust/kernel/sync/
H A Darc.rs20 alloc::{AllocError, Flags, KBox},
213 E: From<AllocError>, in try_pin_init() argument
221 E: From<AllocError>, in try_init() argument
229 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
715 E: From<AllocError>, in try_pin_init() argument
723 E: From<AllocError>, in try_init() argument
753 pub fn new(value: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
761 pub fn new_uninit(flags: Flags) -> Result<UniqueArc<MaybeUninit<T>>, AllocError> { in new_uninit() argument
763 let inner = KBox::try_init::<AllocError>( in new_uninit()
766 data <- pin_init::uninit::<T, AllocError>(), in new_uninit()
[all …]
/linux/drivers/android/binder/
H A Dfreeze.rs6 alloc::AllocError,
72 fn new(flags: kernel::alloc::Flags) -> Result<UninitFM, AllocError> { in new() argument
322 fn find_freeze_recipients(&self) -> Result<KVVec<(DArc<Node>, Arc<Process>)>, AllocError> { in find_freeze_recipients() argument
360 AllocError in find_freeze_recipients()
370 pub(crate) fn prepare_freeze_messages(&self) -> Result<FreezeMessages, AllocError> { in prepare_freeze_messages() argument
H A Derror.rs71 impl From<kernel::alloc::AllocError> for BinderError {
72 fn from(_: kernel::alloc::AllocError) -> Self { in from()
H A Ddeferred_close.rs12 alloc::{AllocError, Flags},
45 pub(crate) fn new(flags: Flags) -> Result<Self, AllocError> { in new() argument
H A Drust_binder_main.rs200 fn arc_try_new(val: T) -> Result<DLArc<T>, kernel::alloc::AllocError> { in arc_try_new() argument
208 .map_err(|_| kernel::alloc::AllocError) in arc_try_new()
H A Dallocation.rs266 Err(kernel::alloc::AllocError) => { in drop()
H A Dprocess.rs1499 Err(kernel::alloc::AllocError) => { in ioctl_freeze()
/linux/rust/kernel/list/
H A Darc.rs7 use crate::alloc::{AllocError, Flags};
173 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
185 E: From<AllocError>, in pin_init() argument
196 E: From<AllocError>, in init() argument
/linux/rust/pin-init/
H A DREADME.md112 let foo: Result<Pin<Box<Foo>>, AllocError> = Box::pin_init(foo);