does anyone know how to extend the stack space or flush a stack ? i'm working with nested loops and can't find a way to get around this problem...anyone?
Printable View
does anyone know how to extend the stack space or flush a stack ? i'm working with nested loops and can't find a way to get around this problem...anyone?
"i'm working with nested loops "
You sure each loop has an exit that will be sured reached (non infinite loop)?
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
...and beware of recursion, too...
Have nice streets under your wheels
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
its kind recursive too...i've terminated every if
with an end if..my problem is that it uses an algorithm that searches its methods and uses them recursively..over and over again. There's no infinite loop its just that i need a bigger stack space (if possible) or a way to overcome this problem. Thanks for your replies anyway!
If you are using recursion, you should optimise your function for recursion. Make it small and efficient. Use as less variables in it as possible. Use less variables as parameters.
If your algorithm is eating up all of tha available stack space, then you'd better consider a solution that replaces the recursion with an iteration. There is almost always an iterative counterpart to a recursion. Memory requirement of an iterative solution is not a big problem because then you can use dynamic arrays. And you'll get an added speed advantage if you use iteration instead of recursion.