From 2a0c6b4cfeb5d1725e65e714ce7f324583dfa388 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 21 Apr 2026 19:32:40 +0300 Subject: feat!: Initial implementation --- BumpAlloc.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 BumpAlloc.h (limited to 'BumpAlloc.h') diff --git a/BumpAlloc.h b/BumpAlloc.h new file mode 100644 index 0000000..e6ba3e3 --- /dev/null +++ b/BumpAlloc.h @@ -0,0 +1,16 @@ +#ifndef _BUMP_ALLOC +#define _BUMP_ALLOC + +#include "Types.h" + +typedef void* BumpArena; + +BumpArena Bcreate(usize size); +Result Bdestroy(BumpArena b); + +void* Balloc(BumpArena b, usize size); +int Bresizeable(BumpArena b, void* ptr); +Result Bresize(BumpArena b, usize size); +Result Bfree(BumpArena b); + +#endif /* _BUMP_ALLOC */ -- cgit v1.2.3