-Xmn / -Xmns / -Xmnx

Sets the initial and maximum size of the nursery area when using the gencon garbage collection (GC) policy (-Xgcpolicy:gencon), and sets the size of eden when using the balanced garbage collection (GC) policy (-Xgcpolicy:balanced). 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.

Syntax

Setting Effect Default
-Xmn<size> Equivalent to setting both -Xmns and -Xmnx Not set
-Xmns<size> Set initial size 25% of -Xms when using gencon and balanced policies
-Xmnx<size> Set maximum size 25% of -Xmx when using gencon, and 75% of -Xmx when using balanced

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.

Notes:

To set the size of the tenure area of the heap when using gencon GC policy, see -Xmo/-Xmos/-Xmox.

See also