D on next-gen consoles and for game development
Rainer Schuetze
r.sagitario at gmx.de
Thu May 30 02:50:48 PDT 2013
On 29.05.2013 10:06, Manu wrote:
>
> What do you think is easier, or perhaps even POSSIBLE in D?
> A good RC approach, or a V8 quality concurrent+incremental GC?
I think none of them is feasible without write-barriers on pointer
modifications in heap memory. That means extra code needs to be
generated for each pointer modification (if the compiler cannot optimize
it away as LLVM seems to be doing in case of Objectve-C). As an
alternative, Leandros concurrent GC implements them with hardware
support by COW, though at a pretty large granularity (page size). I'm
not sure if this approach can be sensibly combined with RC or
incremental collection.
> I get the feeling either would be acceptable, but I still kinda like
> idea of the determinism an RC collector offers.
If you want it to be safe and efficient, it needs to use deferred
reference counting, and this ain't so deterministic anymore. The good
thing about it is that you usually don't have to scan the whole heap to
find candidates for reclamation.
>
> I reckon this should probably be the next big ticket for D. The
> long-standing shared library problems seem to be being addressed.
The GC proposed by Leandro looks very promising, though it needs support
by the hardware and the OS. I think we should see how far we can get
with this approach.
More information about the Digitalmars-d
mailing list