Searched refs:AllocationError (Results 1 – 5 of 5) sorted by relevance
/DragonOS/kernel/crates/rust-slabmalloc/src/ |
H A D | lib.rs | 54 pub enum AllocationError { enum 67 fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError>; in allocate() argument 68 fn deallocate(&mut self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError>; in deallocate() argument 78 ) -> Result<(), AllocationError>; in refill() argument
|
H A D | zone.rs | 168 fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError> { in allocate() argument 171 Slab::Unsupported => Err(AllocationError::InvalidLayout), in allocate() 181 fn deallocate(&mut self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError> { in deallocate() argument 184 Slab::Unsupported => Err(AllocationError::InvalidLayout), in deallocate() 196 ) -> Result<(), AllocationError> { in refill() argument 204 Slab::Unsupported => Err(AllocationError::InvalidLayout), in refill()
|
H A D | sc.rs | 253 pub fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocationError> { in allocate() argument 289 let res = NonNull::new(ptr).ok_or(AllocationError::OutOfMemory); in allocate() 307 pub fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError> { in deallocate() argument
|
H A D | pages.rs | 239 fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) -> Result<(), AllocationError> { in deallocate() argument
|
/DragonOS/kernel/src/mm/allocator/ |
H A D | slab.rs | 32 Err(AllocationError::OutOfMemory) => { in allocate() 43 Err(AllocationError::InvalidLayout) => panic!("Can't allocate this size"), in allocate() 52 ) -> Result<(), AllocationError> { in deallocate() argument
|