Skip to content

-Xmso

Sets the native stack size for operating system threads.

You can use the -verbose:sizes option to find out the values that the VM is currently using.

When a native method makes a call into the VM, the VM calculates whether the memory required for the call will exceed the -Xmso value. If so, a java/lang/StackOverflowError error is thrown.

Note: Java methods and native methods run on two different stacks and the VM handles switching between them for JNI calls. Each stack is sized using separate options; this option applies to the native stack only. For the Java stack option, see the link in the See also section.

Syntax

    -Xmso<size>

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

Default setting

Default values vary by platform. See Default settings for the Eclipse OpenJ9™ VM.

Note: On 64-bit z/OS, the default size is the minimum that can be allocated by the operating system. So if you set a value that is smaller, that value is ignored by the VM.

See also