summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-08-20 12:55:41 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-08-20 12:55:41 -0700
commitf9c33605700e37b75279ed6ce4bffaad3eb0cf10 (patch)
tree7c6b37102801db71543fb228c129eb4ff9d5777c
parentbuiltin/checkout: Fix message when switching to an existing branch (diff)
parentMerge branch 'jc/maint-follow-rename-fix' into maint (diff)
downloadtgif-f9c33605700e37b75279ed6ce4bffaad3eb0cf10.tar.xz
Merge branch 'maint'
* maint: xmalloc: include size in the failure message
-rw-r--r--wrapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wrapper.c b/wrapper.c
index afb4f6f773..fd8ead33ed 100644
--- 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);