I've lost the exact error message. But basically, the
message said to report the error to this project. The
message said that the RTS system went over the
maximum heap size of roughly 268000000 bytes.
The machine I'm running on is running windows 2000 and
has 1GB of memory. The version of GHC is 6.0.1. The
code was run with the following compiler switches:
ghc -O -fvia-c prob.hs -o prob.
I've attached the file prob.hs.
Computes solution to a puzzle
Logged In: YES
user_id=232905
Thanks for a fine report. The heap overflow wasn't reported
as gracefully as it could be. Fixed now.
You can change the default max heap size to be greater than
256M via the -M RTS option. You do seem to have a space
leak on your hands, though.
Logged In: YES
user_id=847023
I am now using GHC version 6.2. The error message is
Logged In: YES
user_id=847023
The last message is not complete. The runtime error message
is now: 'Heap Exhausted: Current maximum heap size is
(256Mb); use +RTS -M<size> to increase it.'
I compiled the sample program from ghci as
:!ghc -O -fvia-c +RTS -M500m -RTS prob.hs -o prob
and then ran it from the ghci shell as
:!prob.
My expectations are that the program prob should run or it
should fail and complain that 500Meg is not enough.
Logged In: YES
user_id=232905
The +RTS -M<..> -RTS setting needs to be given to the
Haskell binary when you exec it, not when you compile and
link it (which just has the effect of upping the limit for the
compiler itself.)