pub struct SingleThreadedLinkedListAllocator {
mlla: Mutex<Heap>,
}
Expand description
A wrapper of [linked_list_allocator::Heap] that uses [maitake::sync::Mutex].
This should ONLY be used in a single threaded context, which also includes NOT using it in interrupts.
If an allocation is attempted while the mutex is locked (e.g. we are pre-empted by a thread/interrupt), this allocator will panic.
This allocator MUST be initialized with a call to SingleThreadedLinkedListAllocator::init() before any allocations will succeed
Fields§
§mlla: Mutex<Heap>
Trait Implementations§
source§impl UnderlyingAllocator for SingleThreadedLinkedListAllocator
impl UnderlyingAllocator for SingleThreadedLinkedListAllocator
Auto Trait Implementations§
impl !RefUnwindSafe for SingleThreadedLinkedListAllocator
impl Send for SingleThreadedLinkedListAllocator
impl Sync for SingleThreadedLinkedListAllocator
impl Unpin for SingleThreadedLinkedListAllocator
impl !UnwindSafe for SingleThreadedLinkedListAllocator
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