Componentizing D's garbage collector

Walter Bright newshound2 at digitalmars.com
Mon Jan 13 14:55:17 PST 2014


On 1/13/2014 1:28 PM, Benjamin Thaut wrote:
> Am 13.01.2014 21:44, schrieb Walter Bright:
>>
>>
>> A moving GC is already supported by D's semantics.
>>
>> Unions are dealt with by 'pinning' those objects, i.e. simply don't move
>> them. I know this can work because I implemented a mostly copying
>> generational collector years ago for Java. (After I invented this,
>> someone else came out with a paper about a "mostly copying" collector,
>> so I didn't get any credit. Oh well! But the idea is sound and it works
>> in the real world.)
>
> I would prefer a option where the user can specifiy a function to scan classes /
> structs that contain unions percisely instead of pinning it.
> In generall I would want a option to specify a manual scanning function for any
> block of GC managed memory, D is a systems programming language after all and
> specifing a custom scanning functionn can be a lot more effective then assuming
> the worst possible case for that memory block.
>

I agree, but I was trying to correct the misperception that current D does not 
allow a moving collector.


More information about the Digitalmars-d mailing list