Hi
As you all will know the JVM allocates x MB of minimum memory and y MB of maximum memory, if no parameters are given. If the application needs more memory, a MemoryOutOfBoundsException is thrown and I have to grant the VM more max and possibly more initial memory by passing appropriate parameters.
For an applet or a web abblication this may be a good behavior. But for a desktop application noone will expect this. And it prevents me from simply doubleclicking a jar file to start my application, if it needs more memory than the default.
And if an application can perfectly run with a few MB of memory, but potentially needs way more, if large resources are loaded at runtime, I find it bad to let the JVM always take 2 GB just to make sure, that it will work in all situations, but also robbs 2 GB of my memory, even if it won’t need most of it.
A normal desktop application only takes the memory, that it needs and dynamically allocates more from the system heap when it needs more. This should also be the default behavior for a Java application, if run in desktop mode and no xMx or xMs parameters are passed.
What do you think?
Marvin
