summaryrefslogtreecommitdiff
path: root/src/std/mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/std/mem.h')
-rw-r--r--src/std/mem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/std/mem.h b/src/std/mem.h
index 6e76763..8ab6f46 100644
--- a/src/std/mem.h
+++ b/src/std/mem.h
@@ -12,6 +12,14 @@
#include <stddef.h>
#include "defines.h"
+typedef void* (*alloc_fn)(size_t size);
+typedef void (*free_fn)(void* ptr);
+
+typedef struct allocator_t {
+ alloc_fn alloc;
+ free_fn free;
+} allocator_t;
+
// --- Arena
// Inspired by https://nullprogram.com/blog/2023/09/27/