DuckDB’s BlockAllocator reserves one mmap arena, addresses blocks by shifting, recycles them through per-thread free lists, commits them lazily, and estimates retention with a …
DuckDB’s TemporaryMemoryManager models throughput versus materialization cost as a convex objective, computes its gradient analytically, and uses it to split one budget between …
The eviction queue is a lock-free MPMC queue of weak_ptr plus a monotonic sequence number; dead nodes are detected and purged in bulk every 4096 inserts.