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

Monitor total allocated bytes on the Java heap by the JVM #505

Open
thurka opened this issue Jun 3, 2023 · 0 comments
Open

Monitor total allocated bytes on the Java heap by the JVM #505

thurka opened this issue Jun 3, 2023 · 0 comments
Assignees

Comments

@thurka
Copy link
Member

thurka commented Jun 3, 2023

JDK 21 added new com.sun.management.ThreadMXBean method getAllThreadAllocatedBytes() that, if both isAllocatedThreadMemorySupported() and isThreadAllocatedMemoryEnabled() are true, returns an approximation of the total number of bytes allocated in the Java heap by the JVM process. It would be useful to use this new JXM API to monitor allocated bytes by whole JVM.

Corresponding JDK issue: JDK-8304074.

@thurka thurka self-assigned this Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant