max heap exhausted
Sigbjorn Finne
sof@galois.com
Mon, 15 Apr 2002 11:44:20 -0700
Have a look the the -M RTS option (default is 256M
on Win32, not unlimited.)
--sigbjorn
----- Original Message -----
From: "Hal Daume III" <hdaume@ISI.EDU>
To: "GHC Users Mailing List" <glasgow-haskell-users@haskell.org>
Sent: Monday, April 15, 2002 08:04
Subject: max heap exhausted
> What does it mean when my program tells me:
>
> "fatal error: RTS exhausted max heap size (268435456 bytes)"
>
> ?
>
> My initial understanding was the GHC allocated (perhaps dynamically) a
> heap of unlimited size (at least so says +RTS -help) and when I run my
> (long memory grabbing) program without any RTS flags it gets about 1/4 of
> the way done (on my Windows box -- this is ghc5.03 the original
> snapshot) and then tells me this.
>
> So I go to increase the heap (i have 1g of ram) so I say "+RTS -H512m" and
> immediately it comes back to me with the same error (presumably in trying
> to allocate the heap?).
>
> I think there are really two error messages going on here: the first is
> truly that the heap is exhausted, but the second is more of "I can't
> allocate that much". Am I correct? If so, why not? I can run it with
> -H300m, but not -H350m (on the first RTS doesn't complain until later; on
> the second it complains immediately). How can I give my program more heap
> and why does -H300m give it more heap than without any RTS options which
> should give it unlimited heap?
>
> - Hal
>
> --
> Hal Daume III
>
> "Computer science is no more about computers | hdaume@isi.edu
> than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users