O'Reilly logo

Java 9: Building Robust Modular Applications by Jason Lee, Peter Verhas, Dr. Edward Lavieri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Garbage collection options

Here is a list of JVM sizing options:

Sizing description JVM option flag
Sets the initial heap size (young space plus tenured space).

-XX:InitialHeapSize=3g

Sets the maximum heap size (young space plus tenured space). -XX:MaxHeapSize=3g
Sets the initial and maximum heap size (young space plus tenured space). -Xms2048m -Xmx3g
Sets the initial size of young space. -XX:NewSize=128m
Sets the maximum size of young space. -XX:MaxNewSize=128m
Sets young space size. Uses ration of young verses tenured space. In the sample flag to the right, 3 means that young space will be three times smaller than tenured space. -XX:NewRation=3
Sets the size of single survivor space as a portion of Eden space size.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required