ThreadStackSize includes VM guard pages?

David Holmes david.holmes at oracle.com
Thu Aug 31 21:35:07 UTC 2017


Hi Thomas,

On 31/08/2017 11:13 PM, Thomas Stüfe wrote:
> 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?

Yes.

> 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?

You're not alone, but I personally think this ship has sailed. See some 
discussion in:

https://bugs.openjdk.java.net/browse/JDK-8173817

Cheers,
David



> Kind Regards, Thomas
> 


More information about the hotspot-dev mailing list