Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

-Xmx<size> issues

843798Nov 14 2005 — edited Nov 14 2005
Quick Overview of Application:

I have wrote an applet that uses JAI to display and manipulate images on screen. At any point in time there will be 2 - 15 1MB+ images loaded into memory and being displayed for editing.

I have managed to optimize it down to use about 150MB - 300MB of ram.

--

When I run the applet I am setting the -Xmx<size> setting for the JVM using the java control panel.

The problem I am having is determining the maximum value for the Xmx switch.

On some computers I can set the value to the total amount of ram. On other computers it can only be about 60% of the amount of ram.

Sometimes if the setting is to high the JVM wont start and will say "Several java virtual machines running in the same process caused an error".

Sometimes it will appear to work but the applet throws OutOfMemory erros at 96MB.

Other times, it will work fine.

There are no common factors that I can find to reproduce this problem. I have tested this applet on the following computers.

win xp - p4 2.4Ghz - 768MB ram - max Xmx=512m
win xp - p4 3Ghz - 1024MB ram - max Xmx=1024m
win xp - p2 586Mhz - 192MB ram - max Xmx=192m
win xp - p3 1.05Ghz - 962MB ram - max Xmx=??? (never works)
win xp - p4 2.4Ghz - 768MB ram - max Xmx=768m

--

How do I go about determining the maximum value for this setting???

Why are these issues occuring?


Thanks,

Matt
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 12 2005
Added on Nov 14 2005
1 comment
322 views