Struct mnemos_alloc::node::Recycle
source · #[repr(C)]pub(crate) struct Recycle {
pub(crate) links: Links<Recycle>,
pub(crate) node_layout: Layout,
}
Expand description
A Recycle node type
Recycle is the “terminal state” of all allocations. After the actual heap allocated data has been dropped, all active allocations become a Recycle node. Allocations remain in this state until they have been freed by the underlying allocator.
In the fast path, a Recycle node is dropped directly by the allocator. In the slow path, the intrusive linked list header contained within a Recycle node is used to “send” the allocation to a lock-free, intrusive MpscQueue, where it will live until the allocator cleans up the pending freelist items.
Fields§
§links: Links<Recycle>
§node_layout: Layout
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Recycle
impl Send for Recycle
impl Sync for Recycle
impl !Unpin for Recycle
impl UnwindSafe for Recycle
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