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

David Roundy droundy at abridgegame.org
Wed Feb 23 14:23:59 UTC 2005


On Tue, Feb 22, 2005 at 06:18:02PM +0100, Juliusz Chroboczek wrote:
> > 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.
> 
> Hmm, David, ghc has the most amazing heap profiler I've ever seen.
> The only problem is that it doesn't tell you about data manually
> allocated with mmap (and you do quite a bit of that, in FastPackedString).
> 
> Short story: compile with profiling, run with +RTS -hc, then run hp2ps
> on the resulting file.

One catch is that you can't do that with large repositories, since it would
take too much memory, since there's pretty massive overhead.  Also, I'm not
entirely convinced that compiling with profiling enabled doesn't affect
optimizations which in turn affect heap usage.  And somehow, every time
I've done that, and run hp2ps, it's never seemed to end up actually helping
me reduce memory usage! Well, that's not quite true, but almost.  :(

The mmap stuff really isn't an issue, since it doesn't eat up swap, and it
always comes down to quite a small amount of memory relative to the total
memory usage.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list