How to predict the maximum call depth of a recursive method?

后端 未结 6 1305
太阳男子
太阳男子 2020-12-12 23:39

For the purposes of estimating the maximum call depth a recursive method may achieve with a given amount of memory, what is the (approximate) formula for calculating the mem

6条回答
  •  攒了一身酷
    2020-12-13 00:27

    You can take the empirical road and experiment with your code and the -Xss setting. See here for more: JVM option -Xss - What does it do exactly?

提交回复
热议问题