|
libsnobol4 1.0.2
High-performance SNOBOL4-style pattern matching library
|
Bump-allocated arena pool for short-lived scratch allocations (e.g. AST nodes during compilation, scan-loop temporaries). More...


Go to the source code of this file.
Classes | |
| struct | snobol_arena_t |
Macros | |
| #define | SNOBOL_ARENA_DEFAULT_CAPACITY (64u * 1024u) |
| #define | ARENA_ALLOC(a, t) |
Bump-allocated arena pool for short-lived scratch allocations (e.g. AST nodes during compilation, scan-loop temporaries).
The arena is owned by a single compile/search call: it is initialised once, used for many small fixed-size allocations, and reset (or discarded) when the call completes. There is no per-object free — the whole arena is released by the caller when it goes out of scope. When the arena is exhausted, callers fall back to snobol_malloc().
Definition in file arena.h.
| #define ARENA_ALLOC | ( | a, | |
| t ) |