title: memoFix of Data.Function.Memoize does not free memory after itself
body: <p>I am wondering why the GC never frees memory for main = memo_main. If main = slow_main, the computation takes the same amount of time each time I enter 37. Due to this, the behavior I expected was to see decrease in memory allocation each time the top level memoFix returns. Yet, it is stuck at 370 MBs.</p>
  
  <pre><code>module Main where
  
  import Data.Function.Memoize
  
  memo_fib :: (Int -&gt; Int) -&gt; Int -&gt; Int
  memo_fib _ 0 = 1
  memo_fib _ 1 = 1
  memo_fib f n = f (n-1) + f (n-2)
  
  memo_main = interact $ unlines . map (\x -&gt; show $ memoFix memo_fib $ read x) . lines
  
  slow_fib 0 = 1
  slow_fib 1 = 1
  slow_fib n = slow_fib (n-1) + slow_fib (n-2)
  
  slow_main = interact $ unlines . map (\x -&gt; show $ slow_fib $ read x) . lines
  
  main :: IO ()
  main = memo_main
  </code></pre>
  
  <p>UPD: Resolved. Memory was actually freed, but not returned to the OS. This is per design of GHC RTS. </p>