How can I recover from stack overflow when I need to run recursive code of undetermined depth (and for example show and error when it's too large)?
What is the method with least overhead when using native (x86) stack?
How can I recover from stack overflow when I need to run recursive code of undetermined depth (and for example show and error when it's too large)?
What is the method with least overhead when using native (x86) stack?
one simple way is to pass a variable into your recursive function that keeps track of how deep it is...