From: simonmar Date: Tue, 7 Aug 2001 09:58:39 +0000 (+0000) Subject: [project @ 2001-08-07 09:58:39 by simonmar] X-Git-Tag: Approximately_9120_patches~1345 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7c435dc127d3ca771ee02d03728c7b69a267a6b4;p=ghc-hetmet.git [project @ 2001-08-07 09:58:39 by simonmar] Document the GHCRTS env. var. --- diff --git a/ghc/docs/users_guide/runtime_control.sgml b/ghc/docs/users_guide/runtime_control.sgml index b7b6fab..e97a57d 100644 --- a/ghc/docs/users_guide/runtime_control.sgml +++ b/ghc/docs/users_guide/runtime_control.sgml @@ -60,10 +60,35 @@ +RTS -M128m -RTS to the command line. + + Setting global RTS options + + RTS optionsfrom the environment + environment variablefor + setting RTS options + + 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 + sh-like shell): + + + GHCRTS='-M128m' + export GHCRTS + + + RTS options taken from the GHCRTS environment + variable can be overriden by options given on the command + line. + + + - RTS options to control the garbage-collector + RTS options to control the garbage collector - RTS options, garbage-collection + garbage collectoroptions + RTS optionsgarbage collection There are several options to give you precise control over garbage collection. Hopefully, you won't need any of these in @@ -96,6 +121,34 @@ + + RTS option + + garbage collectioncompacting + + compacting garbage collection + + + 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. + + For a given heap size (using the + 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 + >30%. + + NOTE: compaction doesn't currently work when a single + generation is requested using the + option. + + + + factor RTS option