title: Why does performGC fail to release all memory?
body: <p>Given the program:</p>
  
  <pre><code>import Language.Haskell.Exts.Annotated -- from haskell-src-exts
  import System.Mem
  import System.IO
  import Control.Exception
  
  main :: IO ()
  main = do
    evaluate $ length $ show $ fromParseResult $ parseFileContents $ "data C = C {a :: F {- " ++ replicate 400000 'd' ++ " -}     }"
    performGC
    performGC
    performGC
  </code></pre>
  
  <p>Using GHC 7.0.3, when I run:</p>
  
  <pre><code>$ ghc --make Temp.hs -rtsopts &amp;&amp; Temp.exe +RTS -G1 -S
      Alloc    Copied     Live    GC    GC     TOT     TOT  Page Flts
      bytes     bytes     bytes  user  elap    user    elap
   ...
   29463264        64   8380480  0.00  0.00    0.64    0.85    0    0  (Gen:  0)
         20        56   8380472  0.00  0.00    0.64    0.86    0    0  (Gen:  0)
          0        56   8380472  0.00  0.00    0.64    0.87    0    0  (Gen:  0)
      42256       780     33452  0.00  0.00    0.64    0.88    0    0  (Gen:  0)
          0                      0.00  0.00
  </code></pre>
  
  <p>The <code>performGC</code> call seems to leave 8Mb of memory live, even though it seems like all the memory should be dead. How come?</p>
  
  <p>(Without <code>-G1</code> I see 10Mb live at the end, which I also can't explain.)</p>