mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 05:33:06 +00:00
Add check for madvise(2) to configure.ac.
Some platforms, such as Google's Portable Native Client, use Newlib and thus lack access to madvise(2). In those instances, pages_purge() is transformed into a no-op.
This commit is contained in:
committed by
Jason Evans
parent
70807bc54b
commit
994fad9bda
14
configure.ac
14
configure.ac
@@ -1191,6 +1191,20 @@ if test "x${je_cv_osatomic}" = "xyes" ; then
|
||||
AC_DEFINE([JEMALLOC_OSATOMIC], [ ])
|
||||
fi
|
||||
|
||||
dnl ============================================================================
|
||||
dnl Check for madvise(2).
|
||||
|
||||
JE_COMPILABLE([madvise(2)], [
|
||||
#include <sys/mman.h>
|
||||
], [
|
||||
{
|
||||
madvise((void *)0, 0, 0);
|
||||
}
|
||||
], [je_cv_madvise])
|
||||
if test "x${je_cv_madvise}" = "xyes" ; then
|
||||
AC_DEFINE([JEMALLOC_HAVE_MADVISE], [ ])
|
||||
fi
|
||||
|
||||
dnl ============================================================================
|
||||
dnl Check whether __sync_{add,sub}_and_fetch() are available despite
|
||||
dnl __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n macros being undefined.
|
||||
|
||||
Reference in New Issue
Block a user