Expand description
Zero-Heap Utilities
This module provides stack-allocated, fixed-size data structures that respect the zero-heap mandate for hot paths in the QualiaDB engine.
§Core Principles
- No heap allocation (no Vec, String, Box)
- Fixed-size arrays only
- Caller-supplied output buffers
- Deterministic memory usage
- Compatible with 48-byte NQuin structure
Structs§
- Fixed
Array - Fixed-size array wrapper
- Fixed
Queue - Fixed-size queue (simple FIFO)
- Fixed
Stack - Fixed-size stack
- Ring
Buffer - Ring buffer (circular buffer)
Constants§
- MAX_
FIXED_ ARRAY_ SIZE - Maximum size for fixed arrays (configurable per use case)
- MAX_
RING_ BUFFER_ SIZE - Maximum size for ring buffers (must be power of 2 for efficiency)