From d874d01e8e9a30f0073a6e559cbae07244dec7bf Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 3 Oct 2024 00:36:26 +0200 Subject: Huge library overhaul --- lib/alloc/alloc_arena.c | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 lib/alloc/alloc_arena.c (limited to 'lib/alloc/alloc_arena.c') 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 - -#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:"); -} -- cgit v1.2.3