[Haskell-cafe] Haskell maximum stack depth

Stefan O'Rear stefanor at cox.net
Tue Jan 29 15:13:04 EST 2008

On Tue, Jan 29, 2008 at 07:38:24PM +0000, Neil Mitchell wrote:
> > A lot also depends on compiler (and associated rts), such as whether
> > or not it translates to CPS, thereby in effect building a "stack" (in
> > all but name) on the heap.
> If you burn a lot of heap, for not much gain, that's still a bug,
> albeit one which large limits might be able to paper over for a short
> amount of time. Is the GHC stack not stored on the heap? I thought it
> was. I know the Hugs stack is stored on the stack, and the Yhc one
> isn't.

GHC's stacks are stored in the heap, but as large continuous objects.
GHC does not use the linked lists typical of CPS implementations, and
(as of the Great RTS Cleanout of 4.00) does not even have a chunked
stack.  (In case it proves relevant the stack is not pinned - GHC's GC
has special code to fix up relocated stacks)

-------------- 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/68a5224a/attachment.bin

More information about the Haskell-Cafe mailing list