Any advice for GC/memory debugging
Alan Knowles
alan at akbkhome.com
Mon Sep 1 08:00:56 PDT 2008
Having fleshed out an SMTP server, I've now started testing it against a
good load level.
Apart from the various thread issues in phobos (getHostbyName is not
thread safe etc./ using udns solved alot of this...) - my bigger worry
is memory management.
With GC enabled/or even disabled, the memory pool will rise to ~ 200Mb
from the baseline of ~20K and run out of memory on the box it's running
on. The test box we have peaks at about 30 concurrent
connections/threads. - compiled using GDC (as it's FreeBSD)
From what i've seen, there is no real way to disable the Garbage
collection, in terms of stopping it from managing the
allocation/deallocation of memory? as it is too intertwined in the
management of things like char[] etc..
Has anyone found good ways to analyze where the application may be
leaking memory/allocating to much memory - hooks in the in/out
properties of methods ?
Is there any way to compact the memory, as the pool appears to jump
quite dramatically from ~ 64k->100Mb->250Mb, even though it looks like
the used pool is significantly smaller..
I'm basically fishing for ideas here, as I've got a whole day tomorrow
to start sticking in debugging code to find some answers...
Regards
Alan
More information about the Digitalmars-d-learn
mailing list