Increase the default thread stack size of zero

Andrew Haley aph at redhat.com
Sat Feb 7 19:34:57 UTC 2026


On 07/02/2026 10:16, Bingwu Zhang wrote:
> With respect to the side-effects of this change, I did some tests with 24-GA
> last year. The configuration is: 6MiB/4MiB, 2x 3B4000 @ 1.8GHz, 32 GiB
> physical RAM. Theoretically speaking, I thought increasing the
> default stack size would increase the memory usage. However, after running
> jcstress repeatedly, I did not observe an increase in the total memory usage,
> except for normal tiny differences between runs.

That's what I would expect, Stack is allocated a page at a time, as 
needed. Stack allocation costs only address space, not physical memory.

I wonder what javac is doing when the stack overflows. Did you get a 
stack trace? I wonder if, when compiling the Unicode tables, javac is 
using recursion when it could or should be iterating.

Andrew.



More information about the hotspot-dev mailing list