
1 Dec
2004
1 Dec
'04
4:10 p.m.
Using ghci, I am getting this error message: *Main> timeOp $ print $ sizeFM bigFM' GHC's heap exhausted: current limit is 268435456 bytes;
From this code:
makeList x = map ((\x->x `mod` range).abs) $ Random.randoms (Random.mkStdGen x)::[Int] range=100000 fmRecords' n = listToFM $ take n $ zip (makeList 100) (makeList 200) fmRecords n = listToFM $ take n $ zip [range..] [range..] fmSize=10^6 bigFM = fmRecords fmSize bigFM' = fmRecords' fmSize bigFM works fine so the leak is obviously within makeList. I just don't understand how makeList could produce this error... -Alex- ______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com