diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-04-19 23:54:43 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-05-05 16:25:48 +0200 |
commit | 5282562117565c54ecf3153901a80a244a0577ba (patch) | |
tree | 56cbc3bd80368b38f76d6259e15e87fcff86ef20 /src/config.h | |
parent | ded614f803f56ad979da76485e74732ecdcc57fd (diff) | |
download | redis-5282562117565c54ecf3153901a80a244a0577ba.tar.gz |
More allocators
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index d98067c1f..7e1133ec9 100644 --- a/src/config.h +++ b/src/config.h @@ -15,6 +15,13 @@ #define HAVE_MALLOC_SIZE 1 #define redis_malloc_size(p) tc_malloc_size(p) #endif +#elif defined(USE_JEMALLOC) +#define JEMALLOC_MANGLE +#include <jemalloc/jemalloc.h> +#if JEMALLOC_VERSION_MAJOR >= 2 && JEMALLOC_VERSION_MINOR >= 1 +#define HAVE_MALLOC_SIZE 1 +#define redis_malloc_size(p) JEMALLOC_P(malloc_usable_size)(p) +#endif #elif defined(__APPLE__) #include <malloc/malloc.h> #define HAVE_MALLOC_SIZE 1 |