diff options
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; } |
