From 63dd4db64df2949448ceef1adb3c885c3ebb03b9 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 14 Mar 2010 14:08:47 +0000 Subject: [PATCH] Document the new RTS linker flags --- docs/users_guide/flags.xml | 15 +++++++++++++++ docs/users_guide/runtime_control.xml | 20 ++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index 1a26bee..7a52bdf 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -1819,6 +1819,21 @@ phase n - + + Allow the RTS behaviour to be tweaked via command-line + flags and the GHCRTS environment + variable. + dynamic + - + + + + Set the default RTS options to + opts. + dynamic + - + + Omit linking dynamic diff --git a/docs/users_guide/runtime_control.xml b/docs/users_guide/runtime_control.xml index 9f06ba8..14732c5 100644 --- a/docs/users_guide/runtime_control.xml +++ b/docs/users_guide/runtime_control.xml @@ -10,7 +10,8 @@ code and then links it with a non-trivial runtime system (RTS), which handles storage management, profiling, etc. - You have some control over the behaviour of the RTS, by giving + If you use the -rtsopts flag when linking, + you have some control over the behaviour of the RTS, by giving special command-line arguments to your program. When your Haskell program starts up, its RTS extracts @@ -68,7 +69,8 @@ environment variablefor setting RTS options - RTS options are also taken from the environment variable + When the -rtsopts flag is used when linking, + RTS options are also taken from the environment variable GHCRTSGHCRTS . For example, to set the maximum heap size to 128M for all GHC-compiled programs (using an @@ -1045,6 +1047,20 @@ + + Linker flags to change RTS behaviour + + RTS behaviour, changing + + + GHC lets you exercise rudimentary control over the RTS settings + for any given program, by using the -with-rtsopts + linker flag. For example, to set -H128m -K1m, + link with -with-rtsopts="-H128m -K1m". + + + + “Hooks” to change RTS behaviour -- 1.7.10.4