how to use GC as a leak detector? i.e. get some help info from GC?
Jason House
jason.james.house at gmail.com
Sun May 24 12:24:42 PDT 2009
nobody Wrote:
> Hi,
>
> I'm writing a data processing program in D, which deals with large amounts of
> small objects. One of the thing I found is that D's GC is horribly slow in
> such situation. I tried my program with gc enable & disabled (with some manual
> deletes). The GC disabled version (2 min) is ~100 times faster than the GC
> enabled version (4 hours)!
>
> But of course the GC disabled version still leak memory, it soon exceeds the
> machine memory limit when I try to process more data; while the GC enabled
> version don't have such problem.
>
> So my plan is to use the GC disabled version with manual deletes. But it was
> very hard to find all the memory leaks. I'm wondering: is there anyway to use
> GC as a leak detector? can the GC enabled version give me some help
> information on which objects get collected, so I can manually delete them in
> my GC disabled version? Thanks!
>
>
Why not use valgrind? With the GC disabled, it should give accurate results.
More information about the Digitalmars-d
mailing list