The problem with the D GC

Andrey Khropov andkhropov_nosp at m_mtu-net.ru
Mon Jan 8 10:25:36 PST 2007


Oskar Linde wrote:

> After having fought a while with D programs with runaway memory leaks, I've
> unfortunately had to come to the conclusion that the D GC is not ready for
> production use. The problem is what I'd call "spurious pointers". That is
> random data (strings, numbers, image data, audio or whatever) appearing to
> the GC to be full of pointers to all over the memory space.
> 
> The definite solution has to be a GC that only scans memory containing
> pointers. Sean's patches to make the GC skip scanning memory known to contain
> elements smaller than sizeof(void*) will probably help tremendously. (I'd
> just have to make sure I'm not using dchar[] strings, float or double data,
> or the DMD associative array implementation)

That's what precise GC is all about. 

I think it's the single biggest problem of the present D implementations. Some
of my measurements have shown that on memory-intensive applications current
Phobos GC could be 10x slower than MS.NET 2.0's GC:
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digi
talmars.D&artnum=43991

-- 
AKhropov



More information about the Digitalmars-d mailing list