| Author |
Visualization of Heap Memory In java
|
Rajesh Tarte
Ranch Hand
Joined: Nov 02, 2006
Posts: 33
|
|
|
Is there any way to see how many objects are created in/on Heap memory in java
|
SCJP 1.5 | SCWCD 5.0 |SCBCD
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12907
|
|
|
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.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Rajesh Tarte
Ranch Hand
Joined: Nov 02, 2006
Posts: 33
|
|
Does same kind of functionality available in 1.5
Thanks
|
 |
Ashutosh Gawande
Greenhorn
Joined: Aug 19, 2009
Posts: 11
|
|
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
|
 |
 |
|
|
subject: Visualization of Heap Memory In java
|
|
|