Componentizing D's garbage collector

Timon Gehr timon.gehr at gmx.ch
Mon Jan 13 13:23:29 PST 2014


On 01/13/2014 10:08 PM, Dmitry Olshansky wrote:
> 13-Jan-2014 22:44, "Ola Fosheim Grøstad"
> <ola.fosheim.grostad+dlang at gmail.com>" пишет:
>> On Monday, 13 January 2014 at 17:56:12 UTC, Dmitry Olshansky wrote:
>>> Precisely. Since C space has no type information you have to
>>> conservatively assume that everything can be a pointer.
>>
>> I think we are misunderstanding each other? I don't think a Boehm style
>> GC can do compaction, since you cannot modify the "pointer", hence you
>> have to "pin down" the object it possibly points to (to prevent it from
>> moving)?
>
> So what? It can't move it and as such there is nothing special about it,
> it doesn't _cost_ anything to pin object.
>

Yes, there is a cost. The requirement to pin arbitrary objects at 
arbitrary times, without the possibility to move at pinning time, 
invalidates GC algorithms that depend on being able to move _all_ 
objects within some pool.


More information about the Digitalmars-d mailing list