Skip to content

Is it possible to detect kAddressBits at runtime? #82

@rojkov

Description

@rojkov

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions