pub struct LeakingAllocator { /* private fields */ }
Expand description
A non-thread safe bump-pointer allocator. Does not free or reuse memory. Efficient for small allocations.
Largely inspired by lol_alloc: https://github.com/Craig-Macomber/lol_alloc
Implementations§
Trait Implementations§
Source§impl GlobalAlloc for LeakingAllocator
impl GlobalAlloc for LeakingAllocator
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 moreimpl Sync for LeakingAllocator
Single-threaded context only.
Auto Trait Implementations§
impl !Freeze for LeakingAllocator
impl !RefUnwindSafe for LeakingAllocator
impl Send for LeakingAllocator
impl Unpin for LeakingAllocator
impl UnwindSafe for LeakingAllocator
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