google / google/tcmalloc

Is it possible to detect `kAddressBits` at runtime?

Open
#82 6 comments 9 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.