Add configure-time detection for madvise(..., MADV_DO[NT]DUMP)
This commit is contained in:
parent
211b1f3c7d
commit
ccd09050aa
11
configure.ac
11
configure.ac
@ -1845,6 +1845,17 @@ if test "x${je_cv_madvise}" = "xyes" ; then
|
|||||||
AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED], [ ])
|
AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED], [ ])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Check for madvise(..., MADV_DO[NT]DUMP).
|
||||||
|
JE_COMPILABLE([madvise(..., MADV_DO[[NT]]DUMP)], [
|
||||||
|
#include <sys/mman.h>
|
||||||
|
], [
|
||||||
|
madvise((void *)0, 0, MADV_DONTDUMP);
|
||||||
|
madvise((void *)0, 0, MADV_DODUMP);
|
||||||
|
], [je_cv_madv_dontdump])
|
||||||
|
if test "x${je_cv_madv_dontdump}" = "xyes" ; then
|
||||||
|
AC_DEFINE([JEMALLOC_MADVISE_DONTDUMP], [ ])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Check for madvise(..., MADV_[NO]HUGEPAGE).
|
dnl Check for madvise(..., MADV_[NO]HUGEPAGE).
|
||||||
JE_COMPILABLE([madvise(..., MADV_[[NO]]HUGEPAGE)], [
|
JE_COMPILABLE([madvise(..., MADV_[[NO]]HUGEPAGE)], [
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
@ -288,6 +288,11 @@
|
|||||||
/* Defined if madvise(2) is available but MADV_FREE is not (x86 Linux only). */
|
/* Defined if madvise(2) is available but MADV_FREE is not (x86 Linux only). */
|
||||||
#undef JEMALLOC_DEFINE_MADVISE_FREE
|
#undef JEMALLOC_DEFINE_MADVISE_FREE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if MADV_DO[NT]DUMP is supported as an argument to madvise.
|
||||||
|
*/
|
||||||
|
#undef JEMALLOC_MADVISE_DONTDUMP
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Defined if transparent huge pages (THPs) are supported via the
|
* Defined if transparent huge pages (THPs) are supported via the
|
||||||
* MADV_[NO]HUGEPAGE arguments to madvise(2), and THP support is enabled.
|
* MADV_[NO]HUGEPAGE arguments to madvise(2), and THP support is enabled.
|
||||||
|
Loading…
Reference in New Issue
Block a user