how to set memory used by JVM.
843811Jul 24 2001 — edited Jun 6 2002Who knows how does the JVM set the physical memory it wanted? Or is there any method to enlarge the JVM memory at runtime?
When I use "Java xxx" to run a small class the Runtime.totalMemory() report a small total memory.
And when I use "java yyy" to run a large class the method will report a large total memory.
This way it seems that the JVM will determine the total memory according to the run time work, but when I run a very large work with a lot of memory used the JVM will report a out of memory exception. But when this happened the actual physical memory of my computer still have millions of byte unused.
Is that a bug of JVM or something else?
Who knows? Please tell me.