mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 08:33:38 +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
|
|
@ -1824,6 +1824,15 @@ if test "x${je_cv_madvise}" = "xyes" ; then
|
|||
], [je_cv_madv_free])
|
||||
if test "x${je_cv_madv_free}" = "xyes" ; then
|
||||
AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
|
||||
elif test "x${je_cv_madvise}" = "xyes" ; then
|
||||
case "${host_cpu}" in i686|x86_64)
|
||||
case "${host}" in *-*-linux*)
|
||||
AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
|
||||
AC_DEFINE([JEMALLOC_DEFINE_MADVISE_FREE], [ ])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl Check for madvise(..., MADV_DONTNEED).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue