[messages] [Developers] Re: determining how much heap a BufferedImage uses
pgeerkens at hotmail.com
Wed Nov 10 20:25:58 MST 2010
Running Eclipse on Windows Vista, I first duplicated your results. Then
I stepped up to the top range to see if the ratio persisted, which it
did - with a min/max heap of 961 MB I could only allocate a single image
of 640MB. However I then left the heap allocation as is, and added the
code to first create the second image of 240 MB, and then the third of
another 16 MB. So with heap set to exactly 961MB I could create 896MB of
total buffered image on the heap, though only when the largest single
buffered image was no more than 640MB.
There should be other parameters to control how the JVM manages the
heap, as this cannot be the only case of a program requiring one single
very large memory allocation, and a multitude of smaller ones totalling
very much less space. Some how we need a means for telling the heap
manager that the one large image is exceptional, and not indicative of
total heap requirements. I am new to Java, and might not have looked
into this except that last week I was crapping out trying to create a
single buffered image of nearly 1GB, and could not quite allocate enough
heap on my 3GB workstation.
P.S. Do you know how to get me registered as a VASSAL developer? I am
registered as __pgeerkens__ at SF. Thank you.
Read this topic online here:
More information about the messages