|
Space leak: msg#00155lang.haskell.glasgow.bugs
Chris Kuklewicz wrote: Greg Buchholz wrote: Already the following bit exhibits unexpected memory consumption: main = mapM_ print $ take (n * 5) $ drop (n * 3) [1..] n = 100000 Dropping the elements is more expensive than printing them. Somehow the dropped elements are kept in memory. With profiling (compiled with -prof -auto-all and called with +RTS -p) the memory consumption is not reported, at least the "total alloc" bytes are not much different with and without the "$ drop (n * 3)" part. Only my /usr/bin/time -v shows: Minor (reclaiming a frame) page faults: 4745 for the code above (compiled with optimization) and about ten times less without drop. Cheers Christian
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [GHC] #642: ghci 6.5 (HEAD) starts with wrong module in scope, GHC |
|---|---|
| Next by Date: | GADTs and type synonyms, Ralf Hinze |
| Previous by Thread: | [GHC] #642: ghci 6.5 (HEAD) starts with wrong module in scope, GHC |
| Next by Thread: | Re: Space leak, Tomasz Zielonka |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |