ref: b92b18d15ebabc0879641d758b3c3e2c081bdf71
parent: 40402e51183b677122198d5bb16ce31a87e40a9f
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Sat Nov 25 15:12:59 EST 2023
Hunk_Alloc: say what size failed to alloc
--- a/zone.c
+++ b/zone.c
@@ -58,9 +58,10 @@
{
mem_t *m;
+ assert(size >= 0);
m = calloc(1, sizeof(*m) + size);
if(m == nil)
- fatal("Hunk_Alloc: %s", lerr());
+ fatal("Hunk_Alloc: size=%d: %s", size, lerr());
m->size = size;
m->next = hunk_head;
if(hunk_head != nil)