diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-19 15:15:39 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-19 15:15:39 +1000 |
commit | 6fccac3372170153b59e829d11c6c0b0a5c2bc77 (patch) | |
tree | 92290b3ed628cd2706847fcc3f9bdddeda521d03 /src/std/mem.h | |
parent | 259da84075c62c2ab96c7cb922df2000ebefb735 (diff) |
start fleshing out API for hashmap / hashset
Diffstat (limited to 'src/std/mem.h')
-rw-r--r-- | src/std/mem.h | 8 |
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/ |