Home
last modified time | relevance | path

Searched refs:AllocationError (Results 1 – 5 of 5) sorted by relevance

/DragonOS/kernel/crates/rust-slabmalloc/src/
H A Dlib.rs52 pub enum AllocationError { enum
65 fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError>; in allocate() argument
73 ) -> Result<(), AllocationError>; in deallocate() argument
83 ) -> Result<(), AllocationError>; in refill() argument
H A Dzone.rs159 fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError> { in allocate() argument
162 Slab::Unsupported => Err(AllocationError::InvalidLayout), in allocate()
178 ) -> Result<(), AllocationError> { in deallocate() argument
181 Slab::Unsupported => Err(AllocationError::InvalidLayout), in deallocate()
193 ) -> Result<(), AllocationError> { in refill() argument
201 Slab::Unsupported => Err(AllocationError::InvalidLayout), in refill()
H A Dsc.rs262 pub fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError> { in allocate() argument
298 let res = NonNull::new(ptr).ok_or(AllocationError::OutOfMemory); in allocate()
325 ) -> Result<(), AllocationError> { in deallocate() argument
H A Dpages.rs239 fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError> { in deallocate() argument
/DragonOS/kernel/src/mm/allocator/
H A Dslab.rs36 Err(AllocationError::OutOfMemory) => { in allocate()
47 Err(AllocationError::InvalidLayout) => panic!("Can't allocate this size"), in allocate()
56 ) -> Result<(), AllocationError> { in deallocate() argument