Precise GC

deadalnix deadalnix at gmail.com
Tue Apr 10 00:57:38 PDT 2012


Le 09/04/2012 23:27, Walter Bright a écrit :
> On 4/9/2012 11:30 AM, deadalnix wrote:
>> In the other hand, TLS can be collected independently and only
>> influence the
>> thread that own the data. Both are every powerfull improvement, and
>> the design
>> you propose « as this » cannot provide any mean to handle that. Which
>> is a big
>> missed opportunity, and will be hard to change in the future.
>
> I think this is an orthogonal issue.

You mean an allocator/deallocator one ?

I'm not sure. For instance, concurrent shared memory scanning will 
require some magic on reference changes (it can be hooked into the 
program using page protection). In such a case, you have constraint in 
what the scanning function can do or can't.

If the function is scanning immutable data, such a constraint disappears.

In a similar way, when scanning TLS, you'll want to avoid going into non 
TLS world. This is currently possible only of you go back to main GC 
code and trigger the indirect call every single time you encounter a 
pointer or a reference. This is going to be a performance killer on many 
architecture.

So this code, in a way or another will need to be aware of the 
qualifier. Or it will either require to pass every single 
pointer/reference into an indirect function call, or forget about 
optimizations that the type system has been made to allow (in the 
program in general, not especially in the GC).


More information about the Digitalmars-d mailing list