How to increase the Java stack size?

后端 未结 9 1642
余生分开走
余生分开走 2020-11-22 01:59

I asked this question to get to know how to increase the runtime call stack size in the JVM. I\'ve got an answer to this, and I\'ve also got many useful answers and comments

9条回答
  •  梦毁少年i
    2020-11-22 02:14

    Weird! You are saying that you want to generate a recursion of 1<<15 depth???!!!!

    I'd suggest DON'T try it. The size of the stack will be 2^15 * sizeof(stack-frame). I don't know what stack-frame size is, but 2^15 is 32.768. Pretty much... Well, if it stops at 1024 (2^10) you'll have to make it 2^5 times bigger, it is, 32 times bigger than with your actual setting.

提交回复
热议问题