[Haskell-cafe] Re: Where does memory go?
simonmar at microsoft.com
Mon Jan 9 06:29:37 EST 2006
Joel Reymont wrote:
> I compiled a simple one-liner: main = print "Blah".
> This is the GC report:
> 5,620 bytes allocated in the heap
> 0 bytes copied during GC
> 0 collections in generation 0 ( 0.00s)
> 0 collections in generation 1 ( 0.00s)
> 1 Mb total memory in use
> Where did the memory go?
> What is 5K and what is (more suprisingly) 1Mb?
Actually I'm surprised it's only 5k. It's more like 30k here.
One reason for this allocation is that a buffer gets allocated for the
stdout Handle the first time something is written to it.
More information about the Haskell-Cafe