Support for tracking application memory usage by category
Open
- Dominant language
- C++
- Stars
- 5.3k
- Forks
- 570
- Avg merge
- 23h 43m
- Merged PRs (30d)
- 172
Description
It looks like it would be possible to allow applications to keep track of their memory usage by application-specific categories using the following approach:
- The application calls a tcmalloc extension function that sets a thread-local "tracking tag" (let's say an int32 or int64).
- Malloc calls use the current value of the tracking tag and propagate it to page heap allocation functions. The span metadata records get tagged with the tracking tag.
- Through another new tcmalloc extension function, the application can request page-level statistics by the app-specific tag.
Contributor guide
Assessment
This issue has not been assessed yet.