I've memory profiled a Tomcat web application and I get a strange result, the retained size of memory used by the different packages comes to more than 100% (74% + 44% + 30%...). How can this be?
Retained size of objects > 100%
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Retained size of objects > 100%
Retained size of different objects or object sets, unlike shallow size, must never be summed directly. This is because retained sets of different object sets (of different packages in your example) may intersect, i.e. include same objects, and if you try to directly sum retained sizes such objects will be accounted more than once, which is incorrect.
To see retained size of multiple packages select them (the table supports multiselection) then use Quick info (Ctrl+Q).
Please read more at https://www.yourkit.com/docs/java/help/sizes.jsp
To see retained size of multiple packages select them (the table supports multiselection) then use Quick info (Ctrl+Q).
Please read more at https://www.yourkit.com/docs/java/help/sizes.jsp