Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion folly/memory/test/MallctlHelperTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@
#if defined(FOLLY_USE_JEMALLOC) && (!defined(FOLLY_SANITIZE) || !FOLLY_SANITIZE)
#include <folly/memory/MallctlHelper.h>

#if defined(__FreeBSD__)
#include <malloc_np.h>
#else
#include <jemalloc/jemalloc.h>
#endif

using namespace folly;

#if JEMALLOC_VERSION_MAJOR > 4
#if defined(JEMALLOC_VERSION_MAJOR) && JEMALLOC_VERSION_MAJOR > 4
static constexpr char const* kDecayCmd = "arena.0.dirty_decay_ms";
#else
static constexpr char const* kDecayCmd = "arena.0.decay_time";
Expand Down
5 changes: 3 additions & 2 deletions folly/portability/Malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
#define FOLLY_HAS_JEMALLOC_DEFS 1
#endif
#else
#if !defined(__FreeBSD__)
#if __has_include(<malloc.h>)
#if defined(__FreeBSD__)
#include <malloc_np.h> // @manual
#elif __has_include(<malloc.h>)
#include <malloc.h>
#endif
#define FOLLY_HAS_JEMALLOC_DEFS 0
Expand Down