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 more memory to have longer timings in my analysis. I’m running linux and using gcc. Is there a system call, or environment variable, or gcc flag, or wrapper, or something?
Share
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
ulimitcommand.Edit: That link died in Dec 2023 so here are the contents, as retrieved by the Wayback Machine: