JVM Stack Size: Operating System & Performance Limits

While JVM stack size can be increased, there are practical limitations imposed by the operating system's virtual memory per process and the overhead of allocating excessively large stacks. Attempting to set an invalidly small or excessively large stack size (e.g., `-Xss2g`) will result in a JVM error and program exit.

Sources

Open the full topic