Skip to content

Commit 5d6efc6

Browse files
committed
Determine the page size on Android from NDK header files
The definition of the PAGE_SIZE macro is used as a signal for a 32-bit target or a 64-bit target with an older NDK. Otherwise, a 16KiB page size is assumed. Resolves jemalloc#2657
1 parent 0d7a26e commit 5d6efc6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,11 @@ case "${host}" in
19901990
LG_PAGE=14
19911991
fi
19921992
;;
1993+
*-*-linux-android)
1994+
if test "x$LG_PAGE" = "xdetect"; then
1995+
AC_CHECK_DECLS([PAGE_SIZE], [LG_PAGE=12], [LG_PAGE=14], [#include <sys/user.h>])
1996+
fi
1997+
;;
19931998
aarch64-unknown-linux-*)
19941999
if test "x$LG_PAGE" = "xdetect"; then
19952000
LG_PAGE=16

0 commit comments

Comments
 (0)