Skip to content

Commit fc11f3c

Browse files
committed
Enable overriding JEMALLOC_{ALLOC,FREE}_JUNK.
This resolves jemalloc#509.
1 parent 949a27f commit fc11f3c

File tree

1 file changed

+6
-2
lines changed
  • include/jemalloc/internal

1 file changed

+6
-2
lines changed

include/jemalloc/internal/util.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@
4141
#define MALLOC_PRINTF_BUFSIZE 4096
4242

4343
/* Junk fill patterns. */
44-
#define JEMALLOC_ALLOC_JUNK ((uint8_t)0xa5)
45-
#define JEMALLOC_FREE_JUNK ((uint8_t)0x5a)
44+
#ifndef JEMALLOC_ALLOC_JUNK
45+
# define JEMALLOC_ALLOC_JUNK ((uint8_t)0xa5)
46+
#endif
47+
#ifndef JEMALLOC_FREE_JUNK
48+
# define JEMALLOC_FREE_JUNK ((uint8_t)0x5a)
49+
#endif
4650

4751
/*
4852
* Wrap a cpp argument that contains commas such that it isn't broken up into

0 commit comments

Comments
 (0)