Macaulay2 Engine
Loading...
Searching...
No Matches
res-memblock.hpp File Reference

ResMemoryBlock<T, NSLAB> — resolution-side templated slab bump allocator. More...

Go to the source code of this file.

Classes

class  ResMemoryBlock< T, NSLAB >
struct  ResMemoryBlock< T, NSLAB >::slab

Detailed Description

ResMemoryBlock<T, NSLAB> — resolution-side templated slab bump allocator.

Note
AI-generated documentation. Verify against the source before relying on it.

Declares and defines the per-type slab allocator the F4 resolution loop uses for transient monomial, polynomial-term, and frame-metadata buffers. A linked list of slab records each holds NSLAB Ts (defaulted to 4092 so the slab lands near 16 KB for typical T and stays L1-resident); allocate(n) / reserve(n) + intern(n) return the next n Ts from the current slab, allocating and chaining a new one on overflow, and reset() rewinds the cursor without freeing the chain so a whole degree's worth of transient payload can be bulk-discarded with no per-allocation cost.

Near-twin of f4/memblock.hpp on the GB side; both pre-date the newer MemoryBlock (memtailor Arena wrapper) used by gb-f4/ and NCAlgebras/. The resolution variant differs from F4MemoryBlock by not inheriting from our_new_delete, so ResMemoryBlock instances are expected to live as members of larger structs rather than being individually GC-allocated; the F4 / resolution paths intentionally evolve independently for now.

See also
f4/memblock.hpp
MemoryBlock.hpp
res-f4.hpp
res-poly-ring.hpp

Definition in file res-memblock.hpp.