From 03b645f22bfc7afadc5a8aa6d59edf0eba74a048 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sat, 23 Aug 2025 15:16:04 +0200 Subject: cleanup & json string simd parsing --- src/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/memory.c') diff --git a/src/memory.c b/src/memory.c index 62f47e7..7072c61 100644 --- a/src/memory.c +++ b/src/memory.c @@ -1,8 +1,8 @@ -#include #include #include #include +#include "../include/assert.h" #include "../include/memory.h" #include "../include/types.h" @@ -20,7 +20,7 @@ void *alloc(Arena *a, size count, size tsize, size align) { size padding = -(uptr)a->beg & (align - 1); byte *beg = a->beg + padding; size alloc_size = count * tsize; - assert(beg + alloc_size < a->end); + assert(beg + alloc_size < a->end, "out of memory"); a->beg = beg + alloc_size; return beg; } -- cgit v1.3