D runtime Garbage Collector details
deadalnix
deadalnix at gmail.com
Fri Feb 24 10:05:10 PST 2012
Le 24/02/2012 00:49, Vadim a écrit :
> I am looking for the details on D Garbage Collection implementation. I
> will much appreciate if someone suggests the answers or give some links
> to existing documentation clarifying the following points:
>
> 1. Is it Mark-n-Sweep or copy or generational collector or simple
> reference counting? Or anything else? Any documentation on this would be
> very helpful
>
Mark and sweep, but do not copy and isn't generationnal.
> 2. Sun/Oracle JVM publishes a number of counters in shared memory so
> that user may easily monitor the memory usage and the GC statistics
> real-time without affecting the application (and without modifying the
> application). Is there anything similar for D GC?
>
You should ask the system for thoses infos.
> 3. Is there any performance tests of D GC efficiency? Is it possible to
> write GC-predictable code (without manual allocate/free) or at least do
> something like System.gc()?
Its performance are quite poor ATM, it is getting better, but still not
as effeiscient as java's GC for example. You could disable it using the
class GC on critical period of time, so you'd know when it run and when
it cannot trigger itself. D allow also to manage memory manually, and if
you don't generate garbage, GC will not trigger.
More information about the Digitalmars-d-learn
mailing list