LinkedIn Article to be: Why you need to start moving off C/C++ to D, now.

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 16 11:22:33 PDT 2014


On Wed, Jul 16, 2014 at 06:11:54PM +0000, Araq via Digitalmars-d wrote:
> On Wednesday, 16 July 2014 at 16:57:18 UTC, Kagamin wrote:
> >On Tuesday, 15 July 2014 at 20:44:35 UTC, H. S. Teoh via Digitalmars-d
> >wrote:
> >>Not to mention, when you need to deallocate a large complex data
> >>structure, *somebody* has to do the work -- either you do it
> >>yourself, or the reference counting implementation, or the GC.
> >
> >The first and the last options are still prominent.
> 
> A copying GC copies the live data, deallocation of a large complex
> data structure is free in this scenario. Same if you use a manually
> managed memory region for the data structure and then deallocate the
> region via some batch operation. But hey, this simple fact must be
> wrong because some guy read a single paper about GCs that doesn't even
> cover this point.

Have you even read the paper? What you just said is exactly what the
paper is describing. There are two ends of the spectrum of memory
reclamation algorithms, at one end, you're tracing "matter" (live
objects), and the other end you're tracing "antimatter" (dead objects).
They are just duals of each other, and optimized GC/RC algorithms tend
to approach the middle ground, with time/memory tradeoffs as an
adjustable parameter.


T

-- 
People tell me that I'm paranoid, but they're just out to get me.


More information about the Digitalmars-d mailing list