Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for tracking application memory usage by category #185

Open
mbautin opened this issue Jun 2, 2023 · 0 comments
Open

Support for tracking application memory usage by category #185

mbautin opened this issue Jun 2, 2023 · 0 comments

Comments

@mbautin
Copy link

mbautin commented Jun 2, 2023

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant