visualvm icon indicating copy to clipboard operation
visualvm copied to clipboard

Monitor total allocated bytes on the Java heap by the JVM

Open thurka opened this issue 2 years ago • 0 comments

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 avatar Jun 03 '23 09:06 thurka