C stack
Jan Kort
kort@wins.uva.nl
Fri, 15 Dec 2000 17:59:30 +0100
Simon Marlow wrote:
>
> I don't forsee any problems with the C stack - the stack pointer stays
> static during execution of Haskell code, and only moves when we do a C
> call or return to the RTS.
But how do I get the address of the bottom of the stack ? It seems I can
define a C main so I can get the bottom of the stack, but how do I make
it call Haskell's main to start the application ?
>
> Don't forget to tell the GC to traverse the Haskell heap too - GHC keeps
> this in mmapped address space. See fptools/ghc/rts/MBlock.c for the
> details.
Ok, I will do that, it looks like a better idea than working with
ForeignObj and finalizers.
Jan