> I have some problems using the -H switch with GHC-4.02:
>
> ~ > ghc -c -fvia-C -syslib exts -H45M Types.hs
> GHC's heap exhausted;
> while trying to allocate 0 bytes in a 67108864-byte heap;
> use the -H<size>' option to increase the total heap size.
> gmake: *** [Types.o] Error 1
>
> ~ > ghc -c -fvia-C -syslib exts -H80M Types.hs
> hsc: fatal error: Suggested heap size (-H<size>) is larger
> than max. heap size (-M<size>)
In GHC 4.xx, the -H switch has a different meaning from previous versions.
It now gives a "suggested heap size" to the garbage collector, since
otherwise the heap size will grow and shrink with the requirements of the
program.
The absolute maximum heap size is specified by the -M option. See the
documentation for more details:
http://research.microsoft.com/users/t-simonm/ghc/Docs/latest/users_guide/use
rs_guide-2.html#ss2.12.
In the latest sources, if you give a -H option larger than the current -M,
then the latter will be adjusted.
Cheers,
Simon