Fix building on FreeBSD
Summary: FreeBSD uses jemalloc as the base malloc implementation. The patch has been functional on FreeBSD as of the MariaDB 10.2 port. Closes https://github.com/facebook/rocksdb/pull/3386 Differential Revision: D6765742 Pulled By: yiwu-arbug fbshipit-source-id: d55dbc082eecf640ef3df9a21f26064ebe6587e8
This commit is contained in:
parent
f2f034ef3b
commit
6f5ba0bf5b
@ -16,8 +16,13 @@
|
|||||||
namespace rocksdb {
|
namespace rocksdb {
|
||||||
|
|
||||||
#ifdef ROCKSDB_JEMALLOC
|
#ifdef ROCKSDB_JEMALLOC
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <malloc_np.h>
|
||||||
|
#define je_malloc_stats_print malloc_stats_print
|
||||||
|
#else
|
||||||
#include "jemalloc/jemalloc.h"
|
#include "jemalloc/jemalloc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char* cur;
|
char* cur;
|
||||||
char* end;
|
char* end;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user