Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit

-Xmn / -Xmns / -Xmnx

Sets the initial and maximum size of the nursery area when using the gencon garbage collection (GC) policy (-Xgcpolicy:gencon). These options are ignored if they are used with any other GC policy.

You can use the -verbose:sizes option to find out the value that is being used by the VM.


Setting Effect Default
-Xmn<size> Equivalent to setting both -Xmns and -Xmnx Not set
-Xmns<size> Set initial size 25% of -Xms
-Xmnx<size> Set maximum size 25% of -Xmx

See Using -X command-line options for more information about the <size> parameter.

Restriction: If you try to set -Xmn with either -Xmns or -Xmnx, the VM does not start, returning an error.

To set the size of the tenure area of the heap, see -Xmo/-Xmos/-Xmox.

See also