[Haskell-cafe] Haskell maximum stack depth
Stefan O'Rear
stefanor at cox.net
Tue Jan 29 15:09:41 EST 2008
On Tue, Jan 29, 2008 at 09:28:56AM +0000, Neil Mitchell wrote:
> Hi Adrian,
>
> > The "bug" is in ghc stack management. Why is it so important that the
> > stack size is arbitrarily limited?
>
> It's not, but it makes some things easier and faster. A better
> question is why is it important for the stack to grow dynamically. The
> answer is that its not.
No, it is. A single thread running a recursion-intensive program can
use many 10's of K's of stack; and 10's of K's per thread is not "cheap
threads". GHC has had a dynamically growing stack for many years,
starting at 4k and redoubling when exhaused; the stack size limit is a
bug checker and nothing else.
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080129/fe49e86a/attachment.bin
More information about the Haskell-Cafe
mailing list