Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'maint'
author
Junio C Hamano
<gitster@pobox.com>
Fri, 20 Aug 2010 19:55:41 +0000
(12:55 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 20 Aug 2010 19:55:41 +0000
(12:55 -0700)
* maint:
xmalloc: include size in the failure message
wrapper.c
patch
|
blob
|
history
raw
(from parent 1:
09a0ec5
)
diff --git
a/wrapper.c
b/wrapper.c
index afb4f6f773a3ed909433778f4b4da3740ded2b18..fd8ead33ed72c37e690ee1fc5b8568f629c95145 100644
(file)
--- a/
wrapper.c
+++ b/
wrapper.c
@@
-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);