[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].