Increasing heap size

Simon Marlow simonmar at microsoft.com
Thu Feb 17 06:06:36 EST 2005


On 17 February 2005 10:55, Dmitri Pissarenko wrote:

>> 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.
> 
> Thanks for your answer!
> 
> I tried to use option "+RTS -c -RTS" and then it worked without
> changing the heap size (AFAIK this switches garbage collection to a
> more efficient algorithm).

Using +RTS -c -RTS turns on in-place compacting collection, which will
use less memory but takes longer.  If you use +RTS -M<size> -RTS, then
GHC will automatically turn on compacting collection when the program's
memory requirements approach <size>.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list