pub struct IRQLockedHeap(SpinMutexIRQ<Heap>);Expand description
The synchronized kernel heap allocator: wrapper around linked_list_allocator::Heap A irqsave variant of linked_list_allocator::LockedHeap, which originally only uses a spin mutex. This is not safe when used it’s used in both kernel and interrupt context (dead lock)
Tuple Fields§
§0: SpinMutexIRQ<Heap>Implementations§
Source§impl IRQLockedHeap
impl IRQLockedHeap
pub const fn empty() -> IRQLockedHeap
pub unsafe fn new(heap_bottom: *mut u8, heap_size: usize) -> IRQLockedHeap
Methods from Deref<Target = SpinMutexIRQ<Heap>>§
pub fn lock(&self) -> SpinMutexIRQGuard<'_, T>
Trait Implementations§
Source§impl Deref for IRQLockedHeap
impl Deref for IRQLockedHeap
Source§type Target = SpinMutexIRQ<Heap>
type Target = SpinMutexIRQ<Heap>
The resulting type after dereferencing.
Source§fn deref(&self) -> &SpinMutexIRQ<Heap>
fn deref(&self) -> &SpinMutexIRQ<Heap>
Dereferences the value.
Source§impl GlobalAlloc for IRQLockedHeap
impl GlobalAlloc for IRQLockedHeap
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 more1.28.0§unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8
unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8
Behaves like
alloc, but also ensures that the contents
are set to zero before being returned. Read moreAuto Trait Implementations§
impl !Freeze for IRQLockedHeap
impl !RefUnwindSafe for IRQLockedHeap
impl Send for IRQLockedHeap
impl Sync for IRQLockedHeap
impl Unpin for IRQLockedHeap
impl UnsafeUnpin for IRQLockedHeap
impl UnwindSafe for IRQLockedHeap
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more