How to allow more memory and avoid stack overflow on lots of recursion?

前端 未结 5 2047
-上瘾入骨i
-上瘾入骨i 2021-01-06 19:33

I\'m testing the timing of an algorithm that does lots of recursive calls. My program dies at about 128k recursive calls, and this takes only .05 seconds. I\'d like to allow

5条回答
  •  青春惊慌失措
    2021-01-06 19:59

    There is no stack size complier option for gcc under Linux. However this text discusses how to set the stack size on Linux. using the ulimit command.

提交回复
热议问题