Opened 12 years ago

Closed 11 years ago

Last modified 45 years ago

#196 closed bug (Fixed)

RTS Exhausted max heap size

Reported by: rscottmcintire Owned by: nobody
Priority: normal Milestone:
Component: Runtime System Version: 6.0.1
Keywords: Cc:
Operating System: Architecture:
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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.


Attachments (1)

prob.2.hs (6.2 KB) - added by rscottmcintire 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by rscottmcintire

comment:1 Changed 12 years ago by sigbjorn

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.

comment:2 Changed 11 years ago by rscottmcintire

Logged In: YES 
user_id=847023

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

comment:3 Changed 11 years ago by rscottmcintire

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.

comment:4 Changed 11 years ago by sigbjorn

  • Status changed from assigned to closed
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.)


Note: See TracTickets for help on using tickets.