ThreadStackSize includes VM guard pages?

Thomas Stüfe thomas.stuefe at
Thu Aug 31 13:13:03 UTC 2017

Hi all,

sorry if this question has already been discussed before.

The thread stack size used when creating threads is determined from
-Xss/ThreadStackSize resp. the stacksize constructor argument. The various
VM guard pages (red, yellow etc) are taken from that size, right? So the
usable stack size is ThreadStackSize minus size-of-VM-guard-pages?

If that is true, do we want to change this at some point? It is confusing
and hurts on platforms where page sizes are larger (e.g. 64K paged stacks
on ppc64). I understand that changing this behavior to one where the VM
guard areas would come atop of ThreadStackSize would be an incompatible
change, because it would suddenly drive up memory consumption of systems
which are configured to run smoothly with the old behavior. But for a new
java release this could be tolerated, or?

Kind Regards, Thomas

More information about the hotspot-dev mailing list