How is it ...
Terms and Conditions
How is it possible (if it is) to allocate more memory for the Java Virtual Machine.
JVM should be started with a -Xmx key followed by a specific amount of memory. For example -Xmx256m.
A Runtime.getRuntime().maxMemory(); method should be called and JVM will automatically increase the maximum amount of memory.
It is not possible to allocate a specific amount of memory to JVM, it will be determined automatically depending on the amount of RAM.
In order to allocate a specific amount of memory to JVM it should be started with certain keys. For example, a -Xmx key specifies the maximum amount of memory, while a -Xms key specifies the initial amount of memory.
Read more about