Typically, profilers (such as JProfiler ) will let you see this - see, for example, an explanation of the screencast distribution record .
However, they achieve this by attaching an agent to the JVM, which allows them to intercept low-level operations β this information is usually not available to users or Java programs. This way, you wonβt be able to see the heap through JMX applications such as JConsole or JVisualVM.
source share