aboutsummaryrefslogtreecommitdiff
path: root/dep/jemalloc/src/valgrind.c
diff options
context:
space:
mode:
Diffstat (limited to 'dep/jemalloc/src/valgrind.c')
-rw-r--r--dep/jemalloc/src/valgrind.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/dep/jemalloc/src/valgrind.c b/dep/jemalloc/src/valgrind.c
new file mode 100644
index 00000000000..8e7ef3a2e63
--- /dev/null
+++ b/dep/jemalloc/src/valgrind.c
@@ -0,0 +1,34 @@
+#include "jemalloc/internal/jemalloc_internal.h"
+#ifndef JEMALLOC_VALGRIND
+# error "This source file is for Valgrind integration."
+#endif
+
+#include <valgrind/memcheck.h>
+
+void
+valgrind_make_mem_noaccess(void *ptr, size_t usize)
+{
+
+ VALGRIND_MAKE_MEM_NOACCESS(ptr, usize);
+}
+
+void
+valgrind_make_mem_undefined(void *ptr, size_t usize)
+{
+
+ VALGRIND_MAKE_MEM_UNDEFINED(ptr, usize);
+}
+
+void
+valgrind_make_mem_defined(void *ptr, size_t usize)
+{
+
+ VALGRIND_MAKE_MEM_DEFINED(ptr, usize);
+}
+
+void
+valgrind_freelike_block(void *ptr, size_t usize)
+{
+
+ VALGRIND_FREELIKE_BLOCK(ptr, usize);
+}