More allocators

This commit is contained in:
Pieter Noordhuis
2011-04-19 23:54:43 +02:00
parent ded614f803
commit 5282562117
2 changed files with 23 additions and 2 deletions

View File

@ -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