summaryrefslogtreecommitdiff
path: root/src/std/mem.h
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-02-25 13:41:20 +1100
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-02-25 13:41:20 +1100
commit90bd31473ac4abdb733188dd6bc1bfdb60d97765 (patch)
tree387c22cb14142640a39b266f6d42db36cbc00713 /src/std/mem.h
parentc7957d8ba4c1fe25362f8a033d39acc90de56a0f (diff)
parenta1c3e27c53558fde411e63d8b3e3809c79789ea4 (diff)
Merge branch 'cel-18-arena-allocator' into feature/some-string-utils
Diffstat (limited to 'src/std/mem.h')
-rw-r--r--src/std/mem.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/std/mem.h b/src/std/mem.h
index 75b6d2a..c3ec61d 100644
--- a/src/std/mem.h
+++ b/src/std/mem.h
@@ -14,9 +14,12 @@
// Inspired by https://nullprogram.com/blog/2023/09/27/
typedef struct arena {
char* begin;
+ char* curr;
char* end;
} arena;
arena arena_create(void* backing_buffer, size_t capacity);
-void *arena_alloc(arena* a, size_t size);
-void *arena_alloc_align(arena* a, size_t size, size_t align);
+void* arena_alloc(arena* a, size_t size);
+void* arena_alloc_align(arena* a, size_t size, size_t align);
+void arena_free_all(arena* a);
+// TODO: arena_resize \ No newline at end of file