about summary refs log blame commit diff stats
path: root/arena.h
blob: 4594070ce4d99ae2bfec245272d171ba5fec74af (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                
#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