Memory is handed out in pages.
For decades
on the machines most of us used,
a page was four kilobytes.
4096 bytes.
The number was so stable
that people stopped looking it up.
They typed it.
A buffer sized to one page.
A memory map
aligned by hand.
A native library
whose loadable segments
were laid out
for four kilobyte boundaries.
That number is moving.
Apple Silicon Macs
use sixteen kilobyte pages.
Many arm64 Linux servers
can run kernels with sixty four.
And Android has added
sixteen kilobyte support,
because bigger pages
mean less bookkeeping
and faster apps.
Google Play made it a rule.
From November 2025,
new apps and updates
that target Android 15 or later
must support sixteen kilobyte pages.
Most apps
written only in Kotlin or Java
need nothing.
The ones that break
carry native code.
A shared library
built with four kilobyte alignment
may simply fail to load
on a sixteen kilobyte device.
Not slower.
Not wrong.
Gone, at startup,
on hardware you may not own yet.
And the library is often
not yours.
It came inside an SDK,
an analytics package,
a video player,
a game engine,
built years ago
by someone who also typed 4096.
So find out where you stand.
Search your own code
for the number.
Replace it with a call
that asks the system,
sysconf in C,
the equivalent in your language.
Rebuild your native code
with a current toolchain.
Recent Android NDK releases
align for sixteen kilobytes by default.
Older ones
need a linker flag.
List every native library
your app ships,
including the ones
inside dependencies,
and check their alignment.
Then test on a sixteen kilobyte system,
an emulator image will do,
before a customer does it for you.
Hardware keeps
the old assumptions working
right up to the year
it quietly stops.
Write down
which numbers you never checked.
Then go and check them.
– Serguey Asael Shinder
Top comments (0)