From 6fccac3372170153b59e829d11c6c0b0a5c2bc77 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:15:39 +1000 Subject: start fleshing out API for hashmap / hashset --- src/std/mem.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/std/mem.h') 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 #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/ -- cgit v1.2.3-70-g09d2