[Haskell-cafe] Memory

Jeff Douglas inbuninbu at gmail.com
Mon Feb 16 23:56:24 EST 2009

Hello All,

The kind people at #haskell suggested I come to haskell-cafe for
questions about haskell performance issues.
I'm new to haskell, and I'm having a hard time understanding how to
deal with memory leaks.

I've been playing with some network server examples and I noticed with
each new connection, the memory footprint increases by about 7k
However, the leaks don't seem to have anything to do with the
networking code. Actually I get a huge leak just from using using

> import Control.Monad
> import System.IO
> main = forever $ putStrLn "hi"

When I run it for a few seconds with profiling...

> total time  =        0.36 secs   (18 ticks @ 20 ms)
> total alloc =  54,423,396 bytes  (excludes profiling overheads)

Can this be right?

More information about the Haskell-Cafe mailing list