pub struct MemoryPool<T> { /* private fields */ }Expand description
Memory pool for reducing allocations
Pre-allocates buffers and reuses them to avoid allocation overhead.
§SierraDB Pattern
- Reduces GC pressure
- Improves throughput for high-frequency operations
- Thread-local pools avoid contention
Implementations§
Source§impl<T> MemoryPool<T>
impl<T> MemoryPool<T>
Auto Trait Implementations§
impl<T> Freeze for MemoryPool<T>
impl<T> RefUnwindSafe for MemoryPool<T>where
T: RefUnwindSafe,
impl<T> Send for MemoryPool<T>where
T: Send,
impl<T> Sync for MemoryPool<T>where
T: Sync,
impl<T> Unpin for MemoryPool<T>where
T: Unpin,
impl<T> UnsafeUnpin for MemoryPool<T>
impl<T> UnwindSafe for MemoryPool<T>where
T: UnwindSafe,
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