pub struct Allocator<'a> {
block_list: Option<RefCell<BlockList<'a>>>,
}
Expand description
Simple kernel allocator that keeps a singly-linked list of blocks and finds the first fit.
Fields§
§block_list: Option<RefCell<BlockList<'a>>>
Implementations§
Trait Implementations§
Source§impl GlobalAlloc for Allocator<'_>
impl GlobalAlloc for Allocator<'_>
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout
. Read moreAuto Trait Implementations§
impl<'a> !Freeze for Allocator<'a>
impl<'a> !RefUnwindSafe for Allocator<'a>
impl<'a> Send for Allocator<'a>
impl<'a> !Sync for Allocator<'a>
impl<'a> Unpin for Allocator<'a>
impl<'a> !UnwindSafe for Allocator<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more