Is it possible to detect `kAddressBits` at runtime?
Open
- Dominant language
- C++
- Stars
- 5.3k
- Forks
- 570
- Avg merge
- 23h 43m
- Merged PRs (30d)
- 172
Description
As noted in #33 page tables on Aarch64 can have either 3 or 4 levels. tcmalloc assumes 4 levels for Aarch64 (kAddressBits = 48), but for example RaspberryOS for Aarch64 runs on a kernel with `CONFIG_PGTABLE_LEVELS=3`. As result all programs using tcmalloc fail without patching it to set kAddressBits = 39.
Is it possible to detect `kAddressBits` at runtime?
Contributor guide
Assessment
This issue has not been assessed yet.