turning off garbage collection
Simon Marlow
simonmar at microsoft.com
Wed Jul 27 05:25:12 EDT 2005
On 27 July 2005 05:48, Bernard Pope wrote:
> I'm fairly sure this has been asked before (and recently too), but I
> can't seem to find it in the archives. Sorry for the repetition.
>
> Is there a way I can turn garbage collection off in GHC? I'm happy to
> hack the runtime and comment out code if that is the only way. I just
> don't know which code.
>
> I want to see what effect GC is having on programs that run under
> buddha. I suspect it is costing me a lot in time traversing large
> amounts of data that the debugger is hanging on to.
You can always see the proportion of GC time by using +RTS -sstderr.
You can also set a gigantic allocation area with +RTS -A1G.
Really disabling GC would entail just allocating more and more memory in
the allocation area, and the RTS doesn't know how to do that at the
moment (the alloc area is more or less fixed between GCs). Also, you'd
very quickly eat all the swap in your system, so perhaps this isn't what
you want.
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list