summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-11-22 18:58:58 (GMT)
committerJason Evans <jasone@canonware.com>2016-11-22 18:58:58 (GMT)
commit32127949a3045330b8058bbf474e619e1bf2f05f (patch)
tree3ace87b50dcb2dc194eb8294662dddbca8bab3b7
parentc3b85f25857cf4022be7b186adc1e20206d4c74f (diff)
downloadjemalloc-32127949a3045330b8058bbf474e619e1bf2f05f.zip
jemalloc-32127949a3045330b8058bbf474e619e1bf2f05f.tar.gz
jemalloc-32127949a3045330b8058bbf474e619e1bf2f05f.tar.bz2
Enable overriding JEMALLOC_{ALLOC,FREE}_JUNK.
This resolves #509.
-rw-r--r--include/jemalloc/internal/util.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/jemalloc/internal/util.h b/include/jemalloc/internal/util.h
index 119696b..d9f9741 100644
--- a/include/jemalloc/internal/util.h
+++ b/include/jemalloc/internal/util.h
@@ -41,8 +41,12 @@
#define MALLOC_PRINTF_BUFSIZE 4096
/* Junk fill patterns. */
-#define JEMALLOC_ALLOC_JUNK ((uint8_t)0xa5)
-#define JEMALLOC_FREE_JUNK ((uint8_t)0x5a)
+#ifndef JEMALLOC_ALLOC_JUNK
+# define JEMALLOC_ALLOC_JUNK ((uint8_t)0xa5)
+#endif
+#ifndef JEMALLOC_FREE_JUNK
+# define JEMALLOC_FREE_JUNK ((uint8_t)0x5a)
+#endif
/*
* Wrap a cpp argument that contains commas such that it isn't broken up into