How do I get an out-of-memory error memory usage dump?

T

Todd

Hello all,

I have written an application which uses many Vectors as storage
locations for data needed in subsequent processing. I thought that I
had cleared the data from all of the Vectors once the subsequent
processing was complete so that following cycles can also be
processed.

I had started my application last night before I left work and when I
returned today, it was no longer on screen. I have not included any
"feature" to shut down the interface when execution has completed. As
such, I know that something went wrong.

During development, I had out-of-memory errors showing in the console
of the develoment environment which leads me to believe that this may
be a continuing issue.

My question is how can I get a dump of all memory usage in case of a
fatal crash? I don't mean the contents of the storage, just how much
memory is being used within a method and by the method variables.

Thanks in advance,
Todd
 
J

Jeff Higgins

Todd said:
Hello all,

I have written an application which uses many Vectors as storage
locations for data needed in subsequent processing. I thought that I
had cleared the data from all of the Vectors once the subsequent
processing was complete so that following cycles can also be
processed.

I had started my application last night before I left work and when I
returned today, it was no longer on screen. I have not included any
"feature" to shut down the interface when execution has completed. As
such, I know that something went wrong.

During development, I had out-of-memory errors showing in the console
of the develoment environment which leads me to believe that this may
be a continuing issue.

My question is how can I get a dump of all memory usage in case of a
fatal crash? I don't mean the contents of the storage, just how much
memory is being used within a method and by the method variables.

Thanks in advance,
Todd
<http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html>
 
J

Jack

I don't think you can have that like that. If you set the Sun JVM option
"core dump on out of memory", and use some core dump reader program
(JProfiler for example), then you will be able to know what method
consume how much memory.

HTH

Todd a écrit :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top