Commit 7c435dc1 authored by simonmar's avatar simonmar
Browse files

[project @ 2001-08-07 09:58:39 by simonmar]

Document the GHCRTS env. var.
parent 8e77f6a0
......@@ -60,10 +60,35 @@
<literal>+RTS -M128m -RTS</literal>
to the command line.</para>
<sect2 id="rts-optinos-environment">
<title>Setting global RTS options</title>
<indexterm><primary>RTS options</primary><secondary>from the environment</secondary></indexterm>
<indexterm><primary>environment variable</primary><secondary>for
setting RTS options</secondary></indexterm>
<para>RTS options are also taken from the environment variable
</indexterm>. For example, to set the maximum heap size
to 128M for all GHC-compiled programs (using an
<literal>sh</literal>-like shell):</para>
export GHCRTS
<para>RTS options taken from the <envar>GHCRTS</envar> environment
variable can be overriden by options given on the command
<sect2 id="rts-options-gc">
<title>RTS options to control the garbage-collector</title>
<title>RTS options to control the garbage collector</title>
<indexterm><primary>RTS options, garbage-collection</primary></indexterm>
<indexterm><primary>garbage collector</primary><secondary>options</secondary></indexterm>
<indexterm><primary>RTS options</primary><secondary>garbage collection</secondary></indexterm>
<para>There are several options to give you precise control over
garbage collection. Hopefully, you won't need any of these in
......@@ -95,6 +120,34 @@
<indexterm><primary><option>-c</option></primary><secondary>RTS option</secondary>
<indexterm><primary>garbage collection</primary><secondary>compacting</secondary>
<indexterm><primary>compacting garbage collection</primary></indexterm>
<para>Use a compacting algorithm for collecting the oldest
generation. By default, the oldest generation is collected
using a copying algorithm; this option causes it to be
compacted in-place instead. The compaction algorithm is
slower than the copying algorithm, but the savings in memory
use can be considerable.</para>
<para>For a given heap size (using the <option>-H</option>
option), compaction can in fact reduce the GC cost by
allowing fewer GCs to be performed. This is more likely
when the ratio of live data to heap size is high, say
<para>NOTE: compaction doesn't currently work when a single
generation is requested using the <option>-G1</option>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment