Wednesday, 15 April 2015

java - JProfiler memory views -> Object size -



java - JProfiler memory views -> Object size -

i have next classes in application:

class { string somestring; locale somelocale; map<integer, b> somemap = new hashmap<integer, b>(); fillmap() { // logic fill map instances of b } } class b { // lots of filled collections }

i'm doing profiling session jprofiler identify memory problems. on memory view tab, aggregation level classes, have illustration 2000 instances of a, total size of 156kb.

my question size means? size of references object or size of filled members of (i'm wondering map)? guess it's somehow reference size wanted create sure of this.

the dynamic memory views not show retained sizes, shallow sizes.

to see retained sizes, go heap walker, double click on class create new object set. then, click on "calculate retained , deep size" in header.

this gets retained size entire class, although retained sizes single instances may more interesting. that, go "references" view or "biggest objects" view.

java profile jprofiler

No comments:

Post a Comment