summaryrefslogtreecommitdiff
path: root/include/allocator.h
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2022-12-11 20:00:21 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2022-12-11 20:00:21 +0100
commitf29d35faf7cc574a1a8c109f2f609db9d3d4b5ef (patch)
treedfd2fcbf20f3d37ffe1f19be3d0a9afb7fd24d86 /include/allocator.h
parent24af775b5041cbed67dfc84f3a0d67850a4b6a1b (diff)
bazinga
Diffstat (limited to 'include/allocator.h')
-rw-r--r--include/allocator.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/allocator.h b/include/allocator.h
new file mode 100644
index 0000000..d1fe9f4
--- /dev/null
+++ b/include/allocator.h
@@ -0,0 +1,16 @@
+#ifndef INCLUDE_ALLOCATOR
+#define INCLUDE_ALLOCATOR
+
+#include <projectbase/project_base.h>
+
+typedef struct t_allocator {
+ void* memory;
+ uint64_t cursor;
+ uint64_t size;
+} allocator;
+
+allocator create_allocator(uint64_t size);
+void* allocator_alloc(allocator* al, uint64_t size);
+void destroy_allocator(allocator* al);
+
+#endif \ No newline at end of file