I want accurate information about stack overflowing in VC++ (32 bit and 64 bit), and specially in recursion. In Debug mode, this happens so soon in recursion (like 4500 running of a simple recursive function don't do anything or like). However, it seems release mode is different. It was hard to understand, and I didn't test it by now, because optimization deletes the code that doesn't do anything (apparently removes recursion), as my code or function was so .. I should do more.. I measure the right time in optimized release, I don't know if optimization does the same in more complex quick sort implemented by recursion?
Thanks!
As Andreas Brinck states in his related answer:
In VC++ the default stack size is 1 MB i think, so with a recursion depth of 10.000 each stack frame can be at most ~100 bytes.
This stack size limit can be modified using:
Project → Properties → Configuration Properties → Linker → System → Stack Reserve Size.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With