Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How do I get an out-of-memory error memory usage dump?

Reply
Thread Tools

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

 
 
Todd
Guest
Posts: n/a
 
      09-05-2007
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

 
Reply With Quote
 
 
 
 
Jeff Higgins
Guest
Posts: n/a
 
      09-05-2007

Todd wrote:
> 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>


 
Reply With Quote
 
 
 
 
Jack
Guest
Posts: n/a
 
      09-05-2007
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 :
> 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
>

 
Reply With Quote
 
Todd
Guest
Posts: n/a
 
      09-05-2007
On Sep 5, 8:17 am, "Jeff Higgins" <(E-Mail Removed)> wrote:

>
> <http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html>- Hide quoted text -
>
> - Show quoted text -


I have tried to connect the jconsole to my running application as
described in the guide, however, unfortunately, it looks as if my
system has been configured FAT and not NTFS.

Thanks for pointing me towards that guide. I had thought that
jconsole was for web applications only.


 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      09-05-2007

Todd wrote:
> On Sep 5, 8:17 am, "Jeff Higgins" <(E-Mail Removed)> wrote:
>
>>
>> <http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html>-
>> Hide quoted text -
>>
>> - Show quoted text -

>
> I have tried to connect the jconsole to my running application as
> described in the guide, however, unfortunately, it looks as if my
> system has been configured FAT and not NTFS.
>
> Thanks for pointing me towards that guide. I had thought that
> jconsole was for web applications only.
>
>

hprof ?
<http://java.sun.com/developer/technicalArticles/Programming/HPROF.html>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
retrieving CPU Usage and Memory Usage information in JAVA hvt Java 0 03-13-2007 01:09 PM
retrieving CPU Usage and Memory Usage information in JAVA hvt Java 0 03-13-2007 01:07 PM
Memory Control - Can you get the memory usage of the interpreter? Ian Python 3 07-10-2004 09:16 PM
Need help on memory usage VS PF usage metfan Java 2 10-21-2003 01:58 PM



Advertisments