diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-23 15:16:04 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-27 11:44:07 +0200 |
| commit | 03b645f22bfc7afadc5a8aa6d59edf0eba74a048 (patch) | |
| tree | dda64286a408e104879be2544f9c7dc8aa8e333a /src/memory.c | |
| parent | 6836db9b00d4f13a78a53cc5bdb0b63028188b55 (diff) | |
cleanup & json string simd parsing
Diffstat (limited to 'src/memory.c')
| -rw-r--r-- | src/memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <assert.h> #include <stdint.h> #include <stdlib.h> #include <string.h> +#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; } |
