From 51ba7166987d49ad39065d67308c8484251e97d7 Mon Sep 17 00:00:00 2001 From: Carl Shapiro Date: Tue, 20 Jan 2026 18:56:32 -0800 Subject: [PATCH] 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/jemalloc#2657 --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 897f17198..376779b00 100644 --- a/configure.ac +++ b/configure.ac @@ -1990,6 +1990,11 @@ case "${host}" in LG_PAGE=14 fi ;; + *-*-linux-android) + if test "x$LG_PAGE" = "xdetect"; then + AC_CHECK_DECLS([PAGE_SIZE], [LG_PAGE=12], [LG_PAGE=14], [#include ]) + fi + ;; aarch64-unknown-linux-*) if test "x$LG_PAGE" = "xdetect"; then LG_PAGE=16