[darcs-users] Re: [BK] upgrade will be needed

Tomasz Zielonka tomasz.zielonka at gmail.com
Mon Feb 21 15:55:04 UTC 2005


On Mon, 21 Feb 2005 07:56:13 -0500, David Roundy
<droundy at abridgegame.org> > strace -e darcs ... 2> foo
> 
> gives
> 
> brk(0)                                  = 0x829e000
> brk(0)                                  = 0x829e000
> brk(0x82bf000)                          = 0x82bf000
> brk(0)                                  = 0x82bf000
> 
> I'm not sure what this means.  Since it's not a memory-intensive darcs
> call, I'm guessing this means we've used 0x82bf000 - 0x829e000  virtual
> memory, which probably just the RTS setting the heap size to its default
> value?
> 
> I've just glanced at the man page of sbrk.  I don't think the haskell RTS
> ever frees VM, so probably just one call of sbrk(0), or using strace ought
> to work.

GHC doesn't use brk() or sbrk() to allocate memory. It rather uses mmap()
for this. GHC's RTS "knows" the current size of Haskell heap. You can
run your program with options +RTS -sstderr -RTS - then it will show
you how much memory it used at the end. You can also use +RTS -? -RTS
to see other RTS options.

Best regards
Tomasz




More information about the darcs-users mailing list