Expand description
Arena allocator for batch operations
This module provides arena-based memory allocation to reduce allocation overhead in hot paths and improve memory locality.
§Features (ADR-001)
- Cache-aligned allocations: All allocations are aligned to cache line boundaries (64 bytes)
- Bump allocation: O(1) allocation with minimal overhead
- Batch deallocation: Free all allocations at once via
reset() - Thread-local arenas: Per-thread allocation without synchronization
Structs§
- Arena
- Arena allocator for temporary allocations
- Arena
Vec - Vector allocated from an arena
- Batch
Vector Allocator - Batch vector allocator for processing multiple vectors (ADR-001)
- Cache
Aligned Vec - Get the thread-local arena Note: Commented out due to lifetime issues with RefCell::borrow() escaping closure Use THREAD_ARENA.with(|arena| { … }) directly instead Cache-aligned vector storage for SIMD operations (ADR-001)
Constants§
- CACHE_
LINE_ SIZE - Cache line size (typically 64 bytes on modern CPUs)