Increasing heap size

Simon Marlow simonmar at
Wed Feb 16 05:45:19 EST 2005

On 15 February 2005 20:12, Dmitri Pissarenko wrote:

> I have problems when building a large haskell system (haskell-jvm
> bridge). 
> The compiler complains (see below) that the heap size is too
> small and limited to about 268 MB.
> <error-messages>
> $ make
> C:/Programme/haskell-jvm-bridge-0.3-RC1/bin/MakeJVMModule
> HelloWorld_JVM < HelloWorld_JVM.list
> Created HelloWorld_JVM.hs
> C:/Programme/haskell-jvm-bridge-0.3-RC1/bin/MakeClassModule -import
> Header_Java -import Header_JavaX `echo java_lang_System | sed -e
> 's/_/\./g; s/ \.\./_/g'`
> Created Class_java_lang_System.hs for classes java.lang.System
> ghc -H600M -package javavm -c Class_java_lang_System.hs -o
> Class_java_lang_System.o
> GHC's heap exhausted: current limit is 268435456 bytes;
> Use the `-H<size>' option to increase the total heap size.
> make: *** [Class_java_lang_System.o] Error 251
> </error-messages>
> How can I increase the heap size of ghc?
> I tried to use option -H600M but then I still get the same error.

Actually you need to use the -M option to increase the heap size beyond
this limit on Windows.  I'll see if I can fix the message.


More information about the Glasgow-haskell-users mailing list