What does "calculate exact retained sizes" do

Questions about YourKit Java Profiler
Post Reply
jfding
Posts: 1
Joined: Thu Sep 17, 2015 8:36 am

What does "calculate exact retained sizes" do

Post by jfding »

Right after load memory dump hprof file, it shows the "Retained size" is 230M bytes.
After I click "calculate exact retained size", the number drop to 14M bytes.
I wondering why?
and What does "calculate exact retained sizes" do
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: What does "calculate exact retained sizes" do

Post by Anton Katilin »

Immediately shown retained sizes are quick estimations. They are close to the real value in most cases and thus help to immediately identify problematic classes. Calculation of exact retained size takes time, users should run it explicitly on demand, e.g. if the estimated values do not give a clue.

See also: shallow and retained size explanation:
https://www.yourkit.com/docs/java/help/sizes.jsp
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: What does "calculate exact retained sizes" do

Post by Anton Katilin »

P.S. See also the explanation here: https://www.yourkit.com/docs/java/help/class_list.jsp
Post Reply