[Haskell-cafe] bizarre memory usage with data.binary

Anatoly Yakovenko aeyakovenko at gmail.com
Tue Oct 2 19:08:01 EDT 2007

i am getting some weird memory usage out of this program:

module Main where

import Data.Binary
import Data.List(foldl')

main = do
   let sum' = foldl' (+) 0
   let list::[Int] = decode $ encode $ ([1..] :: [Int])
   print $ sum' list
   print "done"

it goes up to 500M and down to 17M on windows.  Its build with ghc
6.6.1 with the latest data.binary

Any ideas what could be causing the memory usage to jump around so much?


More information about the Haskell-Cafe mailing list