D GC theory

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 24 10:32:03 PST 2015


On Tuesday, 24 February 2015 at 08:39:02 UTC, Kagamin wrote:
> On Tuesday, 24 February 2015 at 00:30:43 UTC, ketmar wrote:
>> On Mon, 23 Feb 2015 21:11:22 +0000, Sativa wrote:
>>
>>> How hard would it be to modify D's GC to do the following two 
>>> things:
>>> 
>>> 1. Scan the heap in the BG on another thread/cpu for 
>>> compactification.
>>
>> needs read/write barriers added to generated code. a major 
>> slowdown for
>> ALL memory access.
>
> Only modifications of pointers, which introduce new cross-block 
> dependencies (so that GC knows to recheck the new dependency). 
> Other memory access goes without slowdown.

That is not quite true. You don't know before hand which one are 
these, so you always need to, at least, check if you need to do 
the work.


More information about the Digitalmars-d mailing list