[Issue 2858] D specs allow GC implementations that don't call finalizers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 20 02:28:22 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2858





------- Comment #8 from smjg at iname.com  2009-04-20 04:28 -------
(In reply to comment #7)
> (In reply to comment #3)
> > SDWF tries to get around this by running a collection if creation of a GDI
> > object fails, in case it frees some system resources in order to try again. 
> > But maybe what we really need is some kind of monitoring system.  How does
> > DMD's GC decide when to run, anyway?
> 
> Collection is triggered by gc_malloc() when no free space can be found.

So it waits until the system runs out of memory before trying to free some? 
This way, D programs are almost bound to run down system memory, denying it to
other programs, sooner or later.  If you're running several programs that rely
on this gc_malloc implementation or similar, at a given time one of them is
likely to be at or near its peak in memory consumption.  Generally speaking,
one program's memory demand cannot trigger another program to collect its
garbage.


-- 



More information about the Digitalmars-d-bugs mailing list