<?xml version="1.0" encoding="iso-8859-1"?>
-<section id="runtime-control">
+<sect1 id="runtime-control">
<title>Running a compiled program</title>
<indexterm><primary>runtime control of Haskell programs</primary></indexterm>
options themselves.
</para>
- <section id="setting-rts-options">
+ <sect2 id="setting-rts-options">
<title>Setting RTS options</title>
<indexterm><primary>RTS options, setting</primary></indexterm>
</itemizedlist>
</para>
- <section id="rts-opts-cmdline">
+ <sect3 id="rts-opts-cmdline">
<title>Setting RTS options on the command line</title>
<para>
<literal>+RTS -M128m -RTS</literal>
to the command line.
</para>
- </section>
+ </sect3>
- <section id="rts-opts-compile-time">
+ <sect3 id="rts-opts-compile-time">
<title>Setting RTS options at compile time</title>
<para>
set <literal>-H128m -K64m</literal>, link
with <literal>-with-rtsopts="-H128m -K64m"</literal>.
</para>
- </section>
+ </sect3>
- <section id="rts-options-environment">
+ <sect3 id="rts-options-environment">
<title>Setting RTS options with the <envar>GHCRTS</envar>
environment variable</title>
a crawl until the OS decides to kill the process (and you
hope it kills the right one).
</para>
- </section>
+ </sect3>
- <section id="rts-hooks">
+ <sect3 id="rts-hooks">
<title>“Hooks” to change RTS behaviour</title>
<indexterm><primary>hooks</primary><secondary>RTS</secondary></indexterm>
versions in the file
<filename>ghc/compiler/parser/hschooks.c</filename> in a GHC
source tree.</para>
- </section>
+ </sect3>
- </section>
+ </sect2>
- <section id="rts-options-misc">
+ <sect2 id="rts-options-misc">
<title>Miscellaneous RTS options</title>
<variablelist>
with a message like “<literal>failed to mmap() memory below 2Gb</literal>”. If you need to use this option to get GHCi working
on your machine, please file a bug.
</para>
-
+
<para>
On 64-bit machines, the RTS needs to allocate memory in the
low 2Gb of the address space. Support for this across
</listitem>
</varlistentry>
</variablelist>
- </section>
+ </sect2>
- <section id="rts-options-gc">
+ <sect2 id="rts-options-gc">
<title>RTS options to control the garbage collector</title>
<indexterm><primary>garbage collector</primary><secondary>options</secondary></indexterm>
generation <replaceable>gen</replaceable> and higher.
Omitting <replaceable>gen</replaceable> turns off the
parallel GC completely, reverting to sequential GC.</para>
-
+
<para>The default parallel GC settings are usually suitable
for parallel programs (i.e. those
using <literal>par</literal>, Strategies, or with multiple
restrict parallel GC to the old generation
with <literal>-qg1</literal>.</para>
</listitem>
- </varlistentry>
+ </varlistentry>
<varlistentry>
<term>
generation <replaceable>gen</replaceable> and higher.
Omitting <replaceable>gen</replaceable> disables
load-balancing entirely.</para>
-
+
<para>
Load-balancing shares out the work of GC between the
available cores. This is a good idea when the heap is
</listitem>
<listitem>
<para>
- The peak memory the RTS has allocated from the OS.
+ The peak memory the RTS has allocated from the OS.
</para>
</listitem>
<listitem>
</varlistentry>
</variablelist>
- </section>
+ </sect2>
- <section>
+ <sect2>
<title>RTS options for concurrency and parallelism</title>
<para>The RTS options related to concurrency are described in
<xref linkend="using-concurrent" />, and those for parallelism in
<xref linkend="parallel-options"/>.</para>
- </section>
+ </sect2>
- <section id="rts-profiling">
+ <sect2 id="rts-profiling">
<title>RTS options for profiling</title>
<para>Most profiling runtime options are only available when you
</listitem>
</varlistentry>
</variablelist>
- </section>
+ </sect2>
- <section id="rts-eventlog">
+ <sect2 id="rts-eventlog">
<title>Tracing</title>
<indexterm><primary>tracing</primary></indexterm>
the binary eventlog file by using the <option>-l</option>
option.
</para>
- </section>
+ </sect2>
- <section id="rts-options-debugging">
+ <sect2 id="rts-options-debugging">
<title>RTS options for hackers, debuggers, and over-interested
souls</title>
</varlistentry>
</variablelist>
- </section>
+ </sect2>
- <section>
+ <sect2>
<title>Getting information about the RTS</title>
<indexterm><primary>RTS</primary></indexterm>
</variablelist>
- </section>
-</section>
+ </sect2>
+</sect1>
<!-- Emacs stuff:
;;; Local Variables: ***