Stack sizes and stack allocation

Yu Zhang yu.zhang at oracle.com
Mon Aug 10 19:11:08 UTC 2015


Hi, Kees,

Please see my comments in line.

Thanks,
Jenny

On 8/9/2015 8:58 AM, Kees Jan Koster wrote:
> Dear All,
>
> Not sure if this is the right channel, please feel free to redirect my question.
>
> Assuming Java 8 on a 64-bit Linux machine with plenty RAM: When I reduce the stack sizes for a JVM, does that impact the stack allocation algorithms of the JVM?
No. You might run into stack overflow error when the stack size is too 
small.
>
> Conversely, if stack allocation calls for too many objects to be allocated on the stack, does the JVM throw a stack overflow error, or fall back to heap allocation?
No. When escape analysis is enabled, some heap objects might be put on 
stack though.
>
> And, how do I investigate this? How would I configure the JVM to print out details of stack allocation vs fall-back to heap?
>
> --
> Kees Jan
>
> http://java-monitor.com/
> kjkoster at kjkoster.org
> +31651838192
>
> I hate unit tests; I much prefer the illusion that there are no errors in my code.
>                                                                   -- Hendrik Muller
>
>
>
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20150810/8b1e1eb7/attachment.html>


More information about the hotspot-gc-use mailing list