Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i reduce ghci's memory usage?

Tags:

haskell

ghc

ghci

I installed GHC-7.4 on an old freebsd box with 512M RAM. All works great ! But the GHCI occupies too much RAM once started.

Any suggestion is appreciated !

like image 256
z_axis Avatar asked Sep 12 '12 00:09

z_axis


2 Answers

You can use ghci +RTS -M100M -c30, if you want to limit heap size to 100MB and using compaction when heap usage increases to 30%.

See RTS options for more information on runtime flags.

like image 126
Satvik Avatar answered Sep 25 '22 12:09

Satvik


Alternatively, use the compiler rather than the interpreter.

like image 27
Don Stewart Avatar answered Sep 23 '22 12:09

Don Stewart