aboutsummaryrefslogtreecommitdiff
path: root/lib/alloc/alloc_arena.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-10-03 00:36:26 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-10-03 00:36:26 +0200
commitd874d01e8e9a30f0073a6e559cbae07244dec7bf (patch)
treedbde18d7ada337b74fe6cfb8ccc35b52008e6aa0 /lib/alloc/alloc_arena.c
parent1e721a413f1d4fc7f7f4e1e691a0a37168f3b302 (diff)
Huge library overhaul
Diffstat (limited to 'lib/alloc/alloc_arena.c')
-rw-r--r--lib/alloc/alloc_arena.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/alloc/alloc_arena.c b/lib/alloc/alloc_arena.c
deleted file mode 100644
index 8d2aa11..0000000
--- a/lib/alloc/alloc_arena.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <stdlib.h>
-
-#include "alloc.h"
-#include "errors.h"
-#include "macros.h"
-
-void *
-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, elemsz, align);
- if (new == 0 || p != nullptr)
- return p;
-
- if (ctx->jmp != nullptr)
- longjmp(*ctx->jmp, 1);
- err("arena_realloc:");
-}