1 / 3
Nov 2004

I don't know any switch to change the maximal stack. The default one is about 128K.
In turbo pascal, we know {$M ....}. how about fp? I never did use gpc, how about that?

  • created

    Nov '04
  • last reply

    Mar '10
  • 2

    replies

  • 974

    views

  • 3

    users

4 years later

No compiler options available here. You may handle stack operations yourself though.

1 year later

Stack overflow occurs when recursive calls eat up all the stack space, so minimizing the variables in those routines and the data passed down, could help. Also try to optimize the recursion or your algorithm to minimize the number of recursive calls or see if you can rewrite your routines to use tail-recursion
Check your code to see if you have an infinite recursion with no break point(s), most of the recursive algorithms are not memory hogs seldom go deeper than a few levels.