Initial commit

This commit is contained in:
seajee
2025-07-22 17:12:24 +02:00
commit 73387bb7a6
5 changed files with 223 additions and 0 deletions

22
README.md Normal file
View File

@@ -0,0 +1,22 @@
# arena.h
A single header library that implements
[https://en.wikipedia.org/wiki/Region-based_memory_management](region-based memory management) in C.
## Example
```c
#define ARENA_IMPLEMENTATION
#include "arena.h"
int main(void)
{
Arena a = {0};
int *x = arena_alloc(&a, sizeof(*x) * 69);
float *y = arena_alloc(&a, sizeof(*y) * 420);
arena_free(&a);
return 0;
}
```