Page 1 of 1

How to avoid stack overflow

Posted: Mon Aug 01, 2016 8:08 am
by ssqq
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?

Re: How to avoid stack overflow

Posted: Fri Aug 05, 2016 12:16 pm
by rickyboy
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.)