• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Visualization of Heap Memory In java

 
Rajesh Tarte
Ranch Hand
Posts: 33
Eclipse IDE Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to see how many objects are created in/on Heap memory in java
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JVM has APIs for debugging and profiling, and the current version of Sun Java 6 includes a nice tool called JVisualVM which can show you a lot of information about what's happening in running Java programs. It can show exactly how much memory running Java programs are using, for example. I don't know if it can show exactly how many objects of what types are created, but maybe it can. You should be able to start this tool by typing in "jvisualvm" in a command prompt window.
 
Rajesh Tarte
Ranch Hand
Posts: 33
Eclipse IDE Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does same kind of functionality available in 1.5

Thanks
 
Ashutosh Gawande
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You can use Jmap for creating the memory dump by providing the process id for java process which is running your program and then you can use eclipse memory analyser tool/plug-in to analyse the memory dump.
This will give you all the details you are looking for. But you will need to have patience in analysing dump and need to understand how to spot an issue.

Regards,
Ashutosh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic