Home
last modified time | relevance | path

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

/rust/kernel/alloc/
Dallocator.rs16 use crate::alloc::{AllocError, Allocator};
78 ) -> Result<NonNull<[u8]>, AllocError> { in call() argument
107 NonNull::new(raw_ptr).ok_or(AllocError)? in call()
136 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
155 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
159 return Err(AllocError); in realloc()
179 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
187 return Err(AllocError); in realloc()
Dallocator_test.rs12 use super::{flags::*, AllocError, Allocator, Flags};
54 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
91 let layout = layout.align_to(min_align).map_err(|_| AllocError)?; in realloc()
97 let dst = NonNull::new(dst).ok_or(AllocError)?; in realloc()
Dkbox.rs7 use super::{AllocError, Allocator, Flags};
248 pub fn new(x: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
267 pub fn new_uninit(flags: Flags) -> Result<Box<MaybeUninit<T>, A>, AllocError> { in new_uninit() argument
279 pub fn pin(x: T, flags: Flags) -> Result<Pin<Box<T, A>>, AllocError> in pin()
376 E: From<AllocError>, in try_pin_init() argument
384 E: From<AllocError>, in try_init() argument
Dkvec.rs11 AllocError, Allocator, Box, Flags,
314 pub fn push(&mut self, v: T, flags: Flags) -> Result<(), AllocError> { in push() argument
490 pub fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> { in with_capacity() argument
611 pub fn reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError> { in reserve() argument
621 return Err(AllocError); in reserve()
626 let new_cap = core::cmp::max(cap * 2, len.checked_add(additional).ok_or(AllocError)?); in reserve()
627 let layout = ArrayLayout::new(new_cap).map_err(|_| AllocError)?; in reserve()
728 pub fn extend_with(&mut self, n: usize, value: T, flags: Flags) -> Result<(), AllocError> { in extend_with() argument
767 pub fn extend_from_slice(&mut self, other: &[T], flags: Flags) -> Result<(), AllocError> { in extend_from_slice() argument
783 pub fn from_elem(value: T, n: usize, flags: Flags) -> Result<Self, AllocError> { in from_elem() argument
[all …]
/rust/kernel/
Dalloc.rs30 pub struct AllocError; struct
156 fn alloc(layout: Layout, flags: Flags) -> Result<NonNull<[u8]>, AllocError> { in alloc() argument
199 ) -> Result<NonNull<[u8]>, AllocError>; in realloc() argument
Dpage.rs6 alloc::{AllocError, Flags},
74 pub fn alloc_page(flags: Flags) -> Result<Self, AllocError> { in alloc_page() argument
78 let page = NonNull::new(page).ok_or(AllocError)?; in alloc_page()
Derror.rs7 use crate::{alloc::AllocError, str::CStr};
199 impl From<AllocError> for Error {
200 fn from(_: AllocError) -> Error { in from()
Dstr.rs5 use crate::alloc::{flags::*, AllocError, KVec};
309 pub fn to_cstring(&self) -> Result<CString, AllocError> { in to_cstring() argument
352 pub fn to_ascii_lowercase(&self) -> Result<CString, AllocError> { in to_ascii_lowercase() argument
369 pub fn to_ascii_uppercase(&self) -> Result<CString, AllocError> { in to_ascii_uppercase() argument
871 type Error = AllocError;
873 fn try_from(cstr: &'a CStr) -> Result<CString, AllocError> { in try_from() argument
Dinit.rs214 alloc::{AllocError, Flags, KBox},
1191 E: From<AllocError>; in try_pin_init() argument
1211 E: From<AllocError>; in try_init() argument
1232 E: From<AllocError>, in try_pin_init() argument
1240 E: From<AllocError>, in try_init() argument
1252 E: From<AllocError>, in try_pin_init() argument
1260 E: From<AllocError>, in try_init() argument
Dworkqueue.rs133 use crate::alloc::{AllocError, Flags};
213 ) -> Result<(), AllocError> { in try_spawn() argument
219 self.enqueue(KBox::pin_init(init, flags).map_err(|_| AllocError)?); in try_spawn()
/rust/kernel/sync/
Darc.rs20 alloc::{AllocError, Flags, KBox},
195 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
636 pub fn new(value: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
644 pub fn new_uninit(flags: Flags) -> Result<UniqueArc<MaybeUninit<T>>, AllocError> { in new_uninit() argument
646 let inner = KBox::try_init::<AllocError>( in new_uninit()
650 data <- init::uninit::<T, AllocError>(), in new_uninit()
651 }? AllocError), in new_uninit()
/rust/kernel/list/
Darc.rs7 use crate::alloc::{AllocError, Flags};
172 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
184 E: From<AllocError>, in pin_init() argument
195 E: From<AllocError>, in init() argument