>
> Is there any way of increasing the amount of stack space available to the
> program at *compile* time, rather than at run-time? I looked for a
compiler
> option like -rts-H16M, but couldn't find one. I'm using GHC 0.29.
>
Hi,
AFAIK, no command line option available for doing what you want, but
you could write your own C hook and link it into the binary, i.e.,
/* rts_hook.c - static heap settings */
#include "rtsdefs.h"
extern struct RTS_FLAGS RTSflags;
void defaultsHook()
{
RTSflags.GcFlags.stksSize = 0x20002; /* 32K words = 128K bytes */
RTSflags.GCFlags.heapSize = 0x400002; /* 4M words = 16M bytes */
}
/* EOF */
compile it as follows:
foo% gcc -c -I<path to where ghc-0.29 include files are situated>
rts_hook.c
...compile Haskell prog...
foo% ghc-0.29 -o thingy Foo.o Bar.o rts_hook.o
Not the most automatic mechanism, but it should work - if you want to
do further setting up, take a look at the RTSFlags.h in the includes
directory, or runtime/main/RTSFlags.lc in the sources.
--Sigbjorn