Behavior of the -H RTS option, possible doc/impl mismatch

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Feb 16 11:31:00 CET 2011


Hello Akio,

Wednesday, February 16, 2011, 11:24:31 AM, you wrote:

> ./a.out +RTS -N7 -A256M -H2G uses around 7 GBytes of memory
> ./a.out +RTS -N7 -A256M -H6G uses around 13 GBytes of memory

ghc uses copying GC by default - when heap overflows, it copies all
the live data to the new heap and use space of old heap for new
allocations. it means that memory usage may grow in 2x jumps in the
worst case and that memory usage may differ 2x from run to run due to
minor changes in input data or RTS heap options

if you need to decrease memory usage, consider -F and -c options. -M
will be especially useful if you know memory usage in advance



-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com




More information about the Glasgow-haskell-users mailing list