[fpc-pascal]heap and stack size

Mark Emerson mark at angelbase.com
Wed Jan 8 15:39:24 CET 2003

Carl Eric Codere wrote:
> > This is extremely good news.  Let me ask (to be certain I understand),
> > can the stack effectively grow the the limit of memory?  Or will there
> > be an artificial ceiling?
> Greetings,
>         With stack checking on, you can simulate a maximum limit which can
> be used before the program gives a RunError 202, for the stack size, for
> BeOS and  DOS, contrary to what Jonas said, is limited to 256Kb. For AmigaOS,
> stack size is limited to 32K (this can be changed in the OS). This is indicated
> in the FAQ
> Carl

Well...yesterday we had a stack overflow running in a DOS window under
Windows 98 on a machine with 64Mb of RAM.  We used {$M....} to solve the
problem.  We also played with {$M....} and discovered that our program
would work with a stack of 1Mb, but crash at 100Kb...so it makes sense
that the default is 256Kb.


More information about the fpc-pascal mailing list