Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
debugging: XMALLOC_POISON
[gitweb.git]
/
git-compat-util.h
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 93f558056dec457570bf2867dc6c75cd5891d2f2..3bcf5b13f2c7bab387b02bd3075629a9d14c5feb 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-91,6
+91,9
@@
static inline void *xmalloc(size_t size)
ret = malloc(1);
if (!ret)
die("Out of memory, malloc failed");
+#ifdef XMALLOC_POISON
+ memset(ret, 0xA5, size);
+#endif
return ret;
}