3

I want to analyse the memory consumption on the basis of different class files, other than the java provided classes (String,etc). I tried JProfiler, jmap and jhat - all provide the information about java classes, but nothing about the custom classes.

Is there any way to see the memory utilisation of the classes which I have written in the web application?

keenthinker
  • 7,645
  • 2
  • 35
  • 45
jayendra bhatt
  • 1,337
  • 2
  • 19
  • 41

2 Answers2

2

The heap walker in JProfiler shows you this information:

enter image description here

after you click the "calculate estimated retained sizes" link above the table. The result is shown in the "Retained Size" column.

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
0

Yourkit has excellent memory telemetry where you can analyze class level memory. https://www.yourkit.com/docs/java/help/memory_telemetry.jsp

JVisualVM has also memory snapshot for class level but not as good as Yourkit. https://visualvm.java.net/snapshots.html

Anudeep Gade
  • 1,365
  • 1
  • 9
  • 18