Componentizing D's garbage collector

Benjamin Thaut code at benjamin-thaut.de
Mon Jan 13 13:28:23 PST 2014


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.



More information about the Digitalmars-d mailing list