34#define ARENA_SNAPSHOT_MAGIC "ARENASNAP"
37#define ARENA_SNAPSHOT_VERSION 1
Core public API for the Arena memory allocator.
bool arena_save_to_file(const t_arena *arena, const char *path)
Save the current contents of an arena to a file.
size_t used
Number of bytes used in the arena buffer.
uint32_t version
Snapshot file format version.
char magic[9]
Magic string ("ARENASNAP\0")
struct s_arena_snapshot_header __attribute__((packed)) t_arena_snapshot_header
Header structure prepended to saved arena snapshots.
bool arena_load_from_file(t_arena *arena, const char *path)
Load arena contents from a snapshot file.
The main memory arena structure used for fast allocation.