what is the StackShadowPages

It seems it's right!!

 

A guy from the sun said as the following:

"

I did find a few snippits here and there, These are from Troubleshooting Guide for Java SE 6 with HotSpotVM

In theHotSpot implementation, Java methods share stack frames with C/C++ native code,
namely user native code and the virtual machine itself. Java methods generate code that checks
that stack space is available a fixed distance towards the end of the stack so that the native code
can be called without exceeding the stack space. This distance towards the end of the stack is
called “Shadow Pages.” The size of the shadow pages is between 3 and 20 pages, depending on
the platform. This distance is tunable, so that applications with native code needing more than
the default distance can increase the shadow page size. The option to increase shadow pages is
-XX:StackShadowPages=n, where n is greater than the default stack shadow pages for the
platform.

If you increase the value of StackShadowPages, you might also need to increase the default
thread stack size using the -Xssparameter. Increasing the default thread stack size might
decrease the number of threads that can be created, so be careful in choosing a value for the
thread stack size. The thread stack size varies by platform from 256k to 1024k."

 

StackShadowPages 一般只有用到本地方法时才会去修改这个值,或则默认值已经能够满足需求,它具体指本地方法与JAVA共享栈,这个值是指在内存单元上,JAVA能够够调用本地方法的最大范围,而这个StackShadowPages 就是这个范围的最大值,一般地如果改变这个值,需要同时修改-Xss 或者-XX:ThreadStackSize= 修改线程的默认栈大小。而这个值会影响到JVM里面最

大的线程数量,所以调整需要小心。

 

一般情况下,在应用程序中,没有调用本地方法时,JVM的这个参数StackShadowPages没有必要修改。 

 

 

http://forums.oracle.com/forums/thread.jspa?messageID=9767929&tstart=0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值