This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to overcome stack overflow???

hello
I am using ARM7 LPC2148.
in the program I have to use recursive function. so there are lots of chances of stack overflow. how to avoid this??

Parents
  • The only real purpose I can think of is to detect when you're about to run out of stack, and stop the recursion there?

    Not sure how actually useful that'd be, though...?

    Again, the safest way to avoid problems due to recursion is: don't do recursion!

    If you don't do it, then it obviously can't cause you any problems!

Reply
  • The only real purpose I can think of is to detect when you're about to run out of stack, and stop the recursion there?

    Not sure how actually useful that'd be, though...?

    Again, the safest way to avoid problems due to recursion is: don't do recursion!

    If you don't do it, then it obviously can't cause you any problems!

Children
No data