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

Discussion in 'Java' started by Todd, Sep 5, 2007.

  1. Todd

    Todd Guest

    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
    Todd, Sep 5, 2007
    #1
    1. Advertising

  2. Todd

    Jeff Higgins Guest

    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>
    Jeff Higgins, Sep 5, 2007
    #2
    1. Advertising

  3. Todd

    Jack Guest

    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
    >
    Jack, Sep 5, 2007
    #3
  4. Todd

    Todd Guest

    On Sep 5, 8:17 am, "Jeff Higgins" <> 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.
    Todd, Sep 5, 2007
    #4
  5. Todd

    Jeff Higgins Guest

    Todd wrote:
    > On Sep 5, 8:17 am, "Jeff Higgins" <> 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>
    Jeff Higgins, Sep 5, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. metfan
    Replies:
    2
    Views:
    4,832
    Robert Olofsson
    Oct 21, 2003
  2. halfdog
    Replies:
    12
    Views:
    12,415
  3. hvt
    Replies:
    0
    Views:
    1,192
  4. hvt
    Replies:
    0
    Views:
    1,447
  5. Krist
    Replies:
    8
    Views:
    6,337
    Arne Vajhøj
    Feb 10, 2010
Loading...

Share This Page