Skip to content

Commit f9c3360

Browse files
committed
Merge branch 'maint'
* maint: xmalloc: include size in the failure message
2 parents 09a0ec5 + 55c6e6d commit f9c3360

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

wrapper.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ void *xmalloc(size_t size)
4040
if (!ret && !size)
4141
ret = malloc(1);
4242
if (!ret)
43-
die("Out of memory, malloc failed");
43+
die("Out of memory, malloc failed (tried to allocate %lu bytes)",
44+
(unsigned long)size);
4445
}
4546
#ifdef XMALLOC_POISON
4647
memset(ret, 0xA5, size);

0 commit comments

Comments
 (0)