use jemalloc only in jemalloc major version > 2
This commit is contained in:
parent
1fdfaef16e
commit
c503a6d5d3
2 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@
|
||||||
#error "Newer version of tcmalloc required"
|
#error "Newer version of tcmalloc required"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(USE_JEMALLOC)
|
#elif defined(USE_JEMALLOC) && (JEMALLOC_VERSION_MAJOR > 2)
|
||||||
#define ZMALLOC_LIB ("jemalloc-" __xstr(JEMALLOC_VERSION_MAJOR) "." __xstr(JEMALLOC_VERSION_MINOR) "." __xstr(JEMALLOC_VERSION_BUGFIX))
|
#define ZMALLOC_LIB ("jemalloc-" __xstr(JEMALLOC_VERSION_MAJOR) "." __xstr(JEMALLOC_VERSION_MINOR) "." __xstr(JEMALLOC_VERSION_BUGFIX))
|
||||||
#include <jemalloc/jemalloc.h>
|
#include <jemalloc/jemalloc.h>
|
||||||
#if (JEMALLOC_VERSION_MAJOR == 2 && JEMALLOC_VERSION_MINOR >= 1) || (JEMALLOC_VERSION_MAJOR > 2)
|
#if (JEMALLOC_VERSION_MAJOR == 2 && JEMALLOC_VERSION_MINOR >= 1) || (JEMALLOC_VERSION_MAJOR > 2)
|
||||||
|
|
|
@ -60,7 +60,7 @@ void zlibc_free(void *ptr) {
|
||||||
#define calloc(count,size) tc_calloc(count,size)
|
#define calloc(count,size) tc_calloc(count,size)
|
||||||
#define realloc(ptr,size) tc_realloc(ptr,size)
|
#define realloc(ptr,size) tc_realloc(ptr,size)
|
||||||
#define free(ptr) tc_free(ptr)
|
#define free(ptr) tc_free(ptr)
|
||||||
#elif defined(USE_JEMALLOC)
|
#elif defined(USE_JEMALLOC) && (JEMALLOC_VERSION_MAJOR > 2)
|
||||||
#include <jemalloc/jemalloc.h>
|
#include <jemalloc/jemalloc.h>
|
||||||
#define malloc(size) je_malloc(size)
|
#define malloc(size) je_malloc(size)
|
||||||
#define calloc(count,size) je_calloc(count,size)
|
#define calloc(count,size) je_calloc(count,size)
|
||||||
|
|
Loading…
Reference in a new issue