Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  xmalloc: include size in the failure message
  • Loading branch information
Junio C Hamano committed Aug 20, 2010
2 parents 09a0ec5 + 55c6e6d commit f9c3360
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ void *xmalloc(size_t size)
if (!ret && !size)
ret = malloc(1);
if (!ret)
die("Out of memory, malloc failed");
die("Out of memory, malloc failed (tried to allocate %lu bytes)",
(unsigned long)size);
}
#ifdef XMALLOC_POISON
memset(ret, 0xA5, size);
Expand Down

0 comments on commit f9c3360

Please sign in to comment.