[messages] [Developers] Re: determining how much heap a BufferedImage uses
uckelman at nomic.net
Mon Nov 22 16:26:29 MST 2010
Thus spake pgeerkens:
> 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.
I understand what you were trying to do now. Thanks.
If you try the demo with -XX:+PrintGCDetails, you can see that there's enough
heap space, but it's just allocated badly between the young, tenured, and
permanent objects. Hmm. There must be some option which will affect this.
> P.S. Do you know how to get me registered as a VASSAL developer? I am
> registered as __pgeerkens__ at SF. Thank you.
I replied quite some time ago that you've been added, but I think you might
not have seen my reply, due to a bug with the list-forum bridge.
More information about the messages