10#ifndef __CWIST_CORE_MEM_ARENA_H__
11#define __CWIST_CORE_MEM_ARENA_H__
20#define CWIST_ARENA_DEFAULT_GENERATION_BYTES (8 * 1024)
struct cwist_arena cwist_arena_t
void * cwist_arena_alloc(cwist_arena_t *arena, size_t size)
Bump-allocate size bytes from the active generation.
bool cwist_arena_owns(const cwist_arena_t *arena, const void *ptr)
Check whether ptr lies inside the active generation buffer.
void cwist_arena_destroy(cwist_arena_t *arena)
Retire the generation and destroy the arena, releasing every allocation made from it at once.
cwist_arena_t * cwist_arena_create(size_t generation_bytes)
Create an arena backed by a recycled thread-local generation buffer.