Skip to content

GHCi Memory Leak in Windows Vista

If use ghci.exe and separating compiling via ghc.exe, memory leak in ghci occurred. After exhausting available memory Vista has no any respond.

Steps for reproduce:

  • Run GHCi: process list has 2 processes: ghci.exe (a), ghc.exe (b),
  • Run separated compilation process 20 times:

Command Line:

for /L %i in (1,1,20) do ghc -fforce-recomp -O --make "problem.hs" -o "problem.exe"

Sample Haskell Program listing (problem.hs):

main :: IO ()
main = do
    print $ [x | x <- [1..]]
    putStrLn "Hello, world!"
  • In process list (taskmgr.exe) you can see processor activity and increased value of "Memory (Private Working Set)" for process (b).
  • As run result "Memory (Private Working Set)" increased about 100Mb.
Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information