[Haskell-cafe] what is a stack overflow?
S. Alexander Jacobson
alex at alexjacobson.com
Mon Jan 24 19:19:09 EST 2005
Thank you iavor. But the -K option doesn't appear
to work with ghci. And I guess the bigger
question is what sort of code causes a
stack overflow. If 5M is enough stack for most
programs then I obviously have some basic coding
error which is causing a stack overflow...
What sort of code causes that?
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
On Mon, 24 Jan 2005, Iavor Diatchki wrote:
> programs compile with GHC have a bunch of command line switches.
> you can see them by typing:
> myProg +RTS -help
> one of them enables you to specify stack space, e.g.
> myPorg +RTS -K5M
> (very briefly) the stack is a part of memory used by the compiler to
> pass around arguments
> to functions, and for temporary computations.
> On Mon, 24 Jan 2005 17:16:08 -0500 (Eastern Standard Time), S.
> Alexander Jacobson <alex at alexjacobson.com> wrote:
>> GHC assumes the user knows the difference between
>> the heap and the stack. I don't. No matter how
>> much heap I specify on the GHCi command line, I
>> get a stack overflow exception. I have no idea
>> what that means or how to remedy it. Hints?
>> Note: My program is basically creating a few 100k
>> item FiniteMaps. I don't think that should exceed
>> the memory on my laptop....
>> S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe