aboutsummaryrefslogtreecommitdiff
path: root/BumpAlloc.h
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2026-04-28 14:06:44 +0300
committerSyndamia <kamen@syndamia.com>2026-05-12 07:08:56 +0300
commit0d249b1d47a7f84cfe5f09ad070d1affd26566da (patch)
treef395f67eecb27daea3fc4a9ad8e59bf40f988984 /BumpAlloc.h
parent5c36b582ad60a569ed996fe188ed92ef6bd7fc5f (diff)
downloadfoollib-0d249b1d47a7f84cfe5f09ad070d1affd26566da.tar
foollib-0d249b1d47a7f84cfe5f09ad070d1affd26566da.tar.gz
foollib-0d249b1d47a7f84cfe5f09ad070d1affd26566da.zip
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.
Diffstat (limited to 'BumpAlloc.h')
-rw-r--r--BumpAlloc.h11
1 files changed, 2 insertions, 9 deletions
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 */