Skip to main content

Module zero_heap

Module zero_heap 

Source
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§

FixedArray
Fixed-size array wrapper
FixedQueue
Fixed-size queue (simple FIFO)
FixedStack
Fixed-size stack
RingBuffer
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)