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
main
Bernard Spil 7 years ago committed by Facebook Github Bot
parent f2f034ef3b
commit 6f5ba0bf5b
  1. 7
      db/malloc_stats.cc

@ -16,8 +16,13 @@
namespace rocksdb {
#ifdef ROCKSDB_JEMALLOC
#ifdef __FreeBSD__
#include <malloc_np.h>
#define je_malloc_stats_print malloc_stats_print
#else
#include "jemalloc/jemalloc.h"
#endif
typedef struct {
char* cur;
char* end;

Loading…
Cancel
Save