Home > DeveloperSection > Interviews > How to change the heap size of a JVM ?

Posted on    July-13-2015 12:39 AM

 Java Java 
 1 Answer(s)
  507  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Posted on    July-13-2015 12:39 AM

The old generation's default heap size can be overridden by using the -Xms and -Xmx switches to specify the initial and maximum sizes respectively:

Format - java -Xms <initial size> -Xmx <maximum size> program
Example - java -Xms64m -Xmx128m Myprogram

Don't want to miss updates? Please click the below button!

Follow MindStick