git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d11631
)
talloc: include valgrind headers if available
author
Stefan Metzmacher
<metze@samba.org>
Mon, 4 Apr 2011 14:28:31 +0000
(16:28 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 12 Apr 2011 06:38:58 +0000
(08:38 +0200)
metze
Signed-off-By: Andrew Tridgell <tridge@samba.org>
(cherry picked from commit
2146ffd764499d67e3f0576a2e78a1575cd52d9c
)
lib/talloc/talloc.c
patch
|
blob
|
history
diff --git
a/lib/talloc/talloc.c
b/lib/talloc/talloc.c
index b640159c195c1415cccd43831a4774c4f463827b..6f952dcdffbc5a9fc14d7b9e02932beb840053c0 100644
(file)
--- a/
lib/talloc/talloc.c
+++ b/
lib/talloc/talloc.c
@@
-45,6
+45,15
@@
#endif
#endif
+/* Special macros that are no-ops except when run under Valgrind on
+ * x86. They've moved a little bit from valgrind 1.0.4 to 1.9.4 */
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ /* memcheck.h includes valgrind.h */
+#include <valgrind/memcheck.h>
+#elif defined(HAVE_VALGRIND_H)
+#include <valgrind.h>
+#endif
+
/* use this to force every realloc to change the pointer, to stress test
code that might not cope */
#define ALWAYS_REALLOC 0