aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-05-10 23:26:01 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-05-10 23:26:01 +0200
commit67122f04e8b3f4bd6ced95a34d94509479d62e9e (patch)
tree615e163dbae82278deaee3f5ba90432e646ae76f /include
parent2d4a11bf98a6b36162cff7fec7b0e7a8b3dc5701 (diff)
Accept an element size argument to allocators
Diffstat (limited to 'include')
-rw-r--r--include/_alloc_fn.h2
-rw-r--r--include/alloc.h4
2 files changed, 3 insertions, 3 deletions
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 */