Update README.md

This commit is contained in:
seajee
2025-07-24 15:46:08 +02:00
parent f9b6b1e7f0
commit ff948662e5

View File

@@ -1,7 +1,8 @@
# arena.h # arena.h
A single header library that implements A single header library that implements
[region-based memory management](https://en.wikipedia.org/wiki/Region-based_memory_management) in C. [region-based memory management](https://en.wikipedia.org/wiki/Region-based_memory_management)
in C using a linked list approach.
## Example ## Example
@@ -11,7 +12,7 @@ A single header library that implements
int main(void) int main(void)
{ {
Arena a = {0}; Arena a = {0}; // or arena_create(...) to specify the region capacity
int *x = arena_alloc(&a, sizeof(*x) * 69); int *x = arena_alloc(&a, sizeof(*x) * 69);
float *y = arena_alloc(&a, sizeof(*y) * 420); float *y = arena_alloc(&a, sizeof(*y) * 420);