Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2009, 03:28 AM
Member
 
Join Date: Jun 2009
Posts: 1
Rep Power: 0
Bolo33 is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
JVm Heap memory settings nagesh Advanced Java 2 09-17-2009 06:47 PM
heap memory usage anomaly? jon80 Threads and Synchronization 1 06-30-2009 07:56 AM
[SOLVED] JVM: Heap out of memory jwilley44 Eclipse 7 02-01-2009 05:13 PM
how do I increase memory allocated to code cache (Non Heap Memory) manibhat Advanced Java 2 08-21-2008 08:33 PM
JVM Heap memory settings nagesh New To Java 1 08-11-2007 11:17 PM


All times are GMT +2. The time now is 03:49 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org