mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-26 05:45:49 +03:00
Define MADV_FREE on our own when needed.
On x86 Linux, we define our own MADV_FREE if madvise(2) is available, but no MADV_FREE is detected. This allows the feature to be built in and enabled with runtime detection.
This commit is contained in:
parent
fc83de0384
commit
31ab38be5f
4 changed files with 23 additions and 1 deletions
|
|
@ -285,6 +285,9 @@
|
|||
#undef JEMALLOC_PURGE_MADVISE_DONTNEED
|
||||
#undef JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS
|
||||
|
||||
/* Defined if madvise(2) is available but MADV_FREE is not (x86 Linux only). */
|
||||
#undef JEMALLOC_DEFINE_MADVISE_FREE
|
||||
|
||||
/*
|
||||
* Defined if transparent huge pages (THPs) are supported via the
|
||||
* MADV_[NO]HUGEPAGE arguments to madvise(2), and THP support is enabled.
|
||||
|
|
|
|||
|
|
@ -47,6 +47,10 @@
|
|||
#endif
|
||||
#include "jemalloc/internal/hooks.h"
|
||||
|
||||
#ifdef JEMALLOC_DEFINE_MADVISE_FREE
|
||||
# define JEMALLOC_MADV_FREE 8
|
||||
#endif
|
||||
|
||||
static const bool config_debug =
|
||||
#ifdef JEMALLOC_DEBUG
|
||||
true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue