Skip to main content

Module arena

Module arena 

Source
Expand description

Bump allocator for per-solve scratch space.

SolverArena provides fast, zero-fragmentation allocation of temporary vectors and slices that are needed only for the duration of a single solve invocation. At the end of the solve, the arena is reset and all memory is reclaimed in O(1).

This avoids repeated heap allocations in hot solver loops and gives deterministic memory usage when a ComputeBudget memory limit is in effect.

Structs§

SolverArena
A simple bump allocator for solver scratch buffers.