Skip to content

Name arenas allocated by mmap in _PyMem_ArenaAlloc for debugging #141770

@SpecLad

Description

@SpecLad

Feature or enhancement

Proposal:

In Linux 5.17 a new feature was added, PR_SET_VMA_ANON_NAME, which lets you give names to anonymous virtual memory ranges. These names are shown in /proc/<pid>/maps, which can help with debugging.

The pymalloc allocator uses mmap to allocate arenas. It should use PR_SET_VMA_ANON_NAME to give names to the memory ranges containing arenas, e.g. "Python: arena".

Some examples of this done for other languages are in Glibc and Go.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions