Menu

#278 RTS Exhausted max heap size

6.0.1
closed-fixed
nobody
5
2004-01-03
2003-10-31
No

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.

Discussion

  • Roland Scott McIntire

    Computes solution to a puzzle

     
  • Sigbjorn Finne

    Sigbjorn Finne - 2003-10-31
    • status: open --> closed-fixed
     
  • Sigbjorn Finne

    Sigbjorn Finne - 2003-10-31

    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.

     
  • Roland Scott McIntire

    Logged In: YES
    user_id=847023

    I am now using GHC version 6.2. The error message is

     
  • Roland Scott McIntire

    • status: closed-fixed --> open-fixed
     
  • Roland Scott McIntire

    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.

     
  • Sigbjorn Finne

    Sigbjorn Finne - 2004-01-03
    • status: open-fixed --> closed-fixed
     
  • Sigbjorn Finne

    Sigbjorn Finne - 2004-01-03

    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.)

     

Log in to post a comment.