|
-
May 23rd, 2001, 11:38 PM
#1
out of stack space error
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?
-
May 24th, 2001, 02:49 AM
#2
Re: out of stack space error
"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.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
May 24th, 2001, 03:27 AM
#3
Re: out of stack space error
...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.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
May 24th, 2001, 08:39 PM
#4
Re: out of stack space error
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!
-
May 24th, 2001, 08:58 PM
#5
Re: out of stack space error
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|