Skip to main content

Module memory_pool

Module memory_pool 

Source
Expand description

Hierarchical MemoryPool for query execution.

Replaces the flat per-query MemoryBudget with a multi-level tree:

DatabaseMemoryPool (process-level, admission control)
  → QueryPool       (per-query slice)
    → FragmentPool   (per-fragment within query)
      → OperatorPool  (per-operator within fragment)
        → TaskPool     (per-task within operator)

All reservations use RAII guards. The database pool enforces a global admission limit so that no single query can exhaust memory for the entire process.

Structs§

DatabaseMemoryPool
Process-level memory pool with admission control.
FragmentPool
Per-fragment memory pool, allocated from QueryPool.
MemoryPoolReservation
RAII guard that releases reserved memory on drop.
OperatorPool
Per-operator memory pool, allocated from FragmentPool.
PoolHandle
Clonable handle that shares the same pool account.
PooledChunk
A DataChunk with an attached MemoryPoolReservation.
QueryPool
Per-query memory pool, allocated from DatabaseMemoryPool.
TaskPool
Per-task memory pool, allocated from OperatorPool.

Enums§

MemoryPoolError
Error type for memory pool operations.