From 0d249b1d47a7f84cfe5f09ad070d1affd26566da Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 28 Apr 2026 14:06:44 +0300 Subject: feat!: Refactor using MemoryManager The idea is to provide a universal memory management "API", through which you allocate and deallocate. This allows our implementations (for String and Vector) to be more generic. It does also allow usage of different allocators depending on situation. --- BumpAlloc.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'BumpAlloc.h') diff --git a/BumpAlloc.h b/BumpAlloc.h index a381134..6ba9caa 100644 --- a/BumpAlloc.h +++ b/BumpAlloc.h @@ -2,15 +2,8 @@ #define _BUMP_ALLOC #include "Types.h" +#include "MemoryManager.h" -typedef void* BumpArena; - -BumpArena B_create(usize size); -Result B_destroy(BumpArena b); - -void* B_alloc(BumpArena b, usize size); -int B_resizeable(BumpArena b, void* ptr); -Result B_resize(BumpArena b, usize size); -Result B_free(BumpArena b); +MemoryManager M_bump(usize size); #endif /* _BUMP_ALLOC */ -- cgit v1.2.3