Go to the first, previous, next, last section, table of contents.

For the compiler's RTS: heap, stack sizes, etc.

The compiler is itself a Haskell program, so it has a tweakable runtime-system (RTS), just like any other Haskell program.

`-H<size>' or `-Rmax-heapsize <size>':
Don't use more than `<size>' bytes for heap space. If more than one of these arguments is given, the largest will be taken. A size of zero can be used to reset the heap size downwards. For example, to run GHC with a heap of 250KB (the default is 6MB), do `-H0 -H250k'.
`-K<size>' or `-Rmax-stksize <size>':
Set the stack space to `<size>' bytes. If you have to set it very high [a megabyte or two, say], the compiler is probably looping, which is a BUG (please report). A size of zero can be used to rest the stack size downwards, as above.
`-Rscale-sizes<factor>':
Multiply the given (or default) heap and stack sizes by `<factor>'. For example, on a DEC Alpha (a 64-bit machine), you might want to double those space sizes; just use `-Rscale-sizes2'. A non-integral factor is OK, too: `-Rscale-sizes1.2'.
`-Rghc-timing':
Reports a one-line useful collection of time- and space- statistics for a module's compilation.
`-Rgc-stats':
Report garbage-collection statistics. It will create a `<foo>.stat' file, in some obvious place (I hope). Alternatively, if you'd rather the GC stats went straight to standard error, you can "cheat" by using, instead: `-optCrts-Sstderr'.
`-Rhbc':
Tell the compiler it has an HBC-style RTS; i.e., it was compiled with HBC. Not used in Real Life.
`-Rghc':
Tell the compiler it has a GHC-style RTS; i.e., it was compiled with GHC. Not used in Real Life.

For all `<size>'s: If the last character of `size' is a K, multiply by 1000; if an M, by 1,000,000; if a G, by 1,000,000,000. Sizes are always in bytes, not words. Good luck on the G's (I think the counter is still only 32-bits [WDP])!


Go to the first, previous, next, last section, table of contents.