[[project @ 2001-08-07 09:58:39 by simonmar] simonmar**20010807095839 Document the GHCRTS env. var. ] { hunk ./ghc/docs/users_guide/runtime_control.sgml 63 + + 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. + + + hunk ./ghc/docs/users_guide/runtime_control.sgml 88 - RTS options to control the garbage-collector + RTS options to control the garbage collector hunk ./ghc/docs/users_guide/runtime_control.sgml 90 - RTS options, garbage-collection + garbage collectoroptions + RTS optionsgarbage collection hunk ./ghc/docs/users_guide/runtime_control.sgml 121 + + + + + 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. + }