diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-05-10 23:26:01 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-05-10 23:26:01 +0200 |
commit | 67122f04e8b3f4bd6ced95a34d94509479d62e9e (patch) | |
tree | 615e163dbae82278deaee3f5ba90432e646ae76f /lib/alloc/alloc_arena.c | |
parent | 2d4a11bf98a6b36162cff7fec7b0e7a8b3dc5701 (diff) |
Accept an element size argument to allocators
Diffstat (limited to 'lib/alloc/alloc_arena.c')
-rw-r--r-- | lib/alloc/alloc_arena.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/alloc/alloc_arena.c b/lib/alloc/alloc_arena.c index 52d0df9..8d2aa11 100644 --- a/lib/alloc/alloc_arena.c +++ b/lib/alloc/alloc_arena.c @@ -5,13 +5,14 @@ #include "macros.h" void * -alloc_arena(void *raw_ctx, void *ptr, size_t old, size_t new, size_t align) +alloc_arena(void *raw_ctx, void *ptr, size_t old, size_t new, size_t elemsz, + size_t align) { struct arena_ctx *ctx = raw_ctx; ASSUME(ctx != nullptr); ASSUME(ctx->a != nullptr); - void *p = arena_realloc(ctx->a, ptr, old, new, 1, align); + void *p = arena_realloc(ctx->a, ptr, old, new, elemsz, align); if (new == 0 || p != nullptr) return p; |