How to avoid stack overflow

Q&A's, tips, howto's

How to avoid stack overflow

Postby ssqq » Mon Aug 01, 2016 8:08 am

I don't know how resume stack space in newLISP.

If I use one function do too much thiings, then the stack of function may occur stack overflow?

If i reject the return value when call other function, then would avoid stack overflow?

If anyone could give me some advise?
ssqq
 
Posts: 88
Joined: Sun May 04, 2014 12:49 pm

Re: How to avoid stack overflow

Postby rickyboy » Fri Aug 05, 2016 12:16 pm

ssqq wrote:I don't know how resume stack space in newLISP.

If I use one function do too much thiings, then the stack of function may occur stack overflow?

If i reject the return value when call other function, then would avoid stack overflow?

If anyone could give me some advise?

I don't understand what you are trying to do. Could you give an example (code) to clarify?

(The only guess I can venture is that you are doing recursive calls and blowing up the stack and you may be asking if newLISP has tail call optimization. It doesn't. All recursive calls add to the stack and there is no way of avoiding that in newLISP, as far as I know.)
(λx. x x) (λx. x x)
rickyboy
 
Posts: 594
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 1 guest

cron