[Haskell-cafe] Why does GHC limit stack size?

Abhay Parvate abhay.parvate at gmail.com
Sat Nov 3 06:46:07 EDT 2007


Hello all,

Why is there a limitation on the stack size in GHC? Like heap where we can
limit the size by -M RTS option but the default is unlimited, why not let
the program use as big a stack as required? If not by default, then by a
separate option?

Some of the functions that we write in recursive fashion will usually cause
a stack overflow, but will work fine if there is more stack (suppose we are
not worried about efficiency). And these functions generally look nicer and
compact than their tail recursive versions.

Is this is a technical hurdle, or just a checkpoint for runaway programs?
Can we have an RTS flag allowing unlimited stack size?

Thanks,
Abhay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071103/3e326127/attachment.htm


More information about the Haskell-Cafe mailing list