Skip to content

Conversation

@lexprfuncall
Copy link

@lexprfuncall lexprfuncall commented Jan 21, 2026

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

@lexprfuncall
Copy link
Author

I tested this change by downloading the r27d (LTS) and r29 (latest) releases of the NDK and followed the autoconf recipe provided here

https://developer.android.com/ndk/guides/other_build_systems#autoconf

on the product of 32-bit and 64-bit versions of ARM and x86 and the r27d and r29 releases of the NDK. When using NDK r27d with a TARGET of aarch64-linux-android or x86_64-linux-android LG_PAGE is 12. If I changed the release of the NDK to r29, LG_PAGE is 14. Irrespective of the NDK release LG_PAGE is always 12 when the TARGET is armv7a-linux-androideabi or i686-linux-android.

As usual, the --with-lg-page flag to ./configure explicitly specifies the page size.

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
@lexprfuncall lexprfuncall force-pushed the fix-android-page-size branch from 8202c47 to 51ba716 Compare January 21, 2026 03:41
@lexprfuncall lexprfuncall merged commit 5d6efc6 into facebook:dev Jan 21, 2026
154 of 155 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing the default to 16 KB for Android.

2 participants