Results 1 to 1 of 1
  1. #1
    Bolo33 is offline Member
    Join Date
    Jun 2009
    Posts
    1
    Rep Power
    0

    Default Using Memory Analyzer to examine the heap

    [Note: Partially resolved, but please read on!]

    I'm using a fairly massive array at one point in my code and am running into problems allocating enough memory to the heap. I've tried up to 1024MB, but the error still occurs. So, I want to see just how big various array sizes are in the heap using jmap to save the heap and memory analyzer to examine it.

    My Eclipse command line, which runs out of a WinXP desktop shortcut:
    "C:\eclipse 3.5\eclipse.exe" -vmargs -Xms512m -Xmx512m

    I'm using jmap with the following command to create a heap snapshot:
    jmap -dump:format=b,file=snapshot1.bin <process id>

    The process ID used is that of Eclipse.

    When I load the heap up in memory analyzer, it's only about 20 - 30MB regardless of whether I use a 30 x 30 array or a 4000 x 4000 array. I can't go much more beyond 4000 x 4000 before I receive:

    "java.lang.OutOfMemoryError: Java heap space"

    But clearly the heap is not that large. Any ideas? Maybe I'm not saving everything to the heap with my procedure above?

    Thank you!

    [Edit: Partially resolved this problem thanks to another post in this forum (which I can't link to due to my newbie status). However, I still don't know why my heap size is so small when exported].
    Last edited by Bolo33; 06-30-2009 at 03:38 AM.

Similar Threads

  1. JVm Heap memory settings
    By nagesh in forum Advanced Java
    Replies: 2
    Last Post: 09-17-2009, 06:47 PM
  2. heap memory usage anomaly?
    By jon80 in forum Threads and Synchronization
    Replies: 1
    Last Post: 06-30-2009, 07:56 AM
  3. [SOLVED] JVM: Heap out of memory
    By jwilley44 in forum Eclipse
    Replies: 7
    Last Post: 02-01-2009, 05:13 PM
  4. Replies: 2
    Last Post: 08-21-2008, 08:33 PM
  5. JVM Heap memory settings
    By nagesh in forum New To Java
    Replies: 1
    Last Post: 08-11-2007, 11:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •