The problem with the D GC

Thomas Kuehne thomas-dloop at kuehne.cn
Tue Jan 9 15:04:41 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kyle Furlong schrieb am 2007-01-09:
> Oskar Linde wrote:
>> Oskar Linde wrote:

<snip>

>> If I wouldn't have a strong belief that automatic ref-counting would be 
>> addressed soon, I'd definitely consider going back to C++. Luckily, 
>> before I'd give up waiting, 64 bit architectures will probably be in 
>> great majority. ;)

> Dont hold your breath for a reference counting implementation from DMD. 
> Walter doesnt want to add any overhead to assignments.

Reference counting implementations would cause a lot of pain and
overhead with array slices. A sweeping GC that has different
pools for non-pointer and may-contain-pointer memory areas is easier to
implement and causes less overhead. In addition reference counting can
cause interesting problems in multi-core systems.
Yes, using advance information all sweeping GC's can be exploited,
though user data should'nt usually be a problem as most of it ends up
in the no-pointer pool. The x86-stack however is a potential attack vector.

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFFpCw3LK5blCcjpWoRAuFjAKCpXiyi61g916iUQO9IUbb8GIv4gwCfWmUG
edc07TIMP5n4l0+bzWXeFr4=
=4xvh
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list