robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
ba70404c55
master
1#pragma once 2 3#include <stddef.h> 4 5typedef struct consumed_blk { 6struct consumed_blk * prev ; 7}* ArenaMem ; 8 9typedef struct { 10char * cur_blk ; 11size_t pos ,size ; 12}Arena ; 13 14#define ARENA_BLOCK_SIZE 4096 15 16// inits an empty arena. 17#define ARENA_EMPTY { .cur_blk = NULL, .pos = 0, .size = 0 }