Go to the first, previous, next, last section, table of contents.

RTS options to control the garbage-collector

Besides the `-H' (set heap size) and `-S'/`-s' (GC stats) RTS options, there are several options to give you precise control over garbage collection.

`-M<n>':
Minimum % <n> of heap which must be available for allocation. The default is 3%.
`-A<size>':
Sets a limit on the size of the allocation area for generational garbage collection to <size> bytes (`-A' gives default of 64k). If a negative size is given the size of the allocation is fixed to -<size>. For non-generational collectors, it fixes the minimum heap which must be available after a collection, overriding the `-M<n>' RTS option.
`-G<size>':
Sets the percentage of free space to be promoted before a major collection is invoked to <size>%. The default is 66%. If a negative size is given it fixes the size of major generation threshold to -<size> bytes.
`-F2s':
Forces a program compiled for generational GC to use two-space copying collection. The two-space collector may outperform the generational collector for programs which have a very low heap residency. It can also be used to generate a statistics file from which a basic heap residency profile can be produced (see Section See section `stat2resid' -- residency info from GC stats). There will still be a small execution overhead imposed by the generational compilation as the test for old generation updates will still be executed (of course none will actually happen). This overhead is typically less than 1%.
`-j<size>':
Force a major garbage collection every <size> bytes. (Normally used because you're keen on getting major-GC stats, notably heap residency info.)


Go to the first, previous, next, last section, table of contents.