From 67122f04e8b3f4bd6ced95a34d94509479d62e9e Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 10 May 2024 23:26:01 +0200 Subject: Accept an element size argument to allocators --- include/_alloc_fn.h | 2 +- include/alloc.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/_alloc_fn.h b/include/_alloc_fn.h index 09a792d..aae4bd0 100644 --- a/include/_alloc_fn.h +++ b/include/_alloc_fn.h @@ -2,6 +2,6 @@ #define MLIB__ALLOC_FN_H typedef void *(*alloc_fn)(void *ctx, void *ptr, size_t old, size_t new, - size_t align); + size_t elemsz, size_t align); #endif /* !MLIB__ALLOC_FN_H */ diff --git a/include/alloc.h b/include/alloc.h index b9e03e2..8004cd0 100644 --- a/include/alloc.h +++ b/include/alloc.h @@ -54,7 +54,7 @@ struct heap_ctx { jmp_buf *jmp; }; -[[nodiscard]] void *alloc_arena(void *, void *, size_t, size_t, size_t); -[[nodiscard]] void *alloc_heap(void *, void *, size_t, size_t, size_t); +[[nodiscard]] void *alloc_arena(void *, void *, size_t, size_t, size_t, size_t); +[[nodiscard]] void *alloc_heap(void *, void *, size_t, size_t, size_t, size_t); #endif /* !MLIB_ALLOC_H */ -- cgit v1.2.3