blob: 4594070ce4d99ae2bfec245272d171ba5fec74af (
plain) (
tree)
|
|
#ifndef ARENA_H
#define ARENA_H
#include <stdint.h>
#include <stddef.h>
typedef struct arena {
uint8_t* memory;
size_t size;
size_t fill;
struct arena* next;
} arena_t;
arena_t* arena_create_sized(size_t size);
arena_t* arena_create(void);
void* arena_malloc(arena_t* arena, size_t size);
void arena_destroy(arena_t* arena);
#endif
|