Antti-Ville Tuuainen Passes GSoC Final Evaluation
Simen Kjaeraas
simen.kjaras at gmail.com
Fri Aug 24 00:32:17 PDT 2012
On Fri, 24 Aug 2012 08:27:09 +0200, Jacob Carlborg <doob at me.com> wrote:
> On 2012-08-23 16:38, Alex Rønne Petersen wrote:
>
>> Yes, but parallelization of the mark phase is fairly trivial, and
>> something we should probably look into.
>>
>> The GC will probably always be STW unless we get compiler support for
>> inserting GC barriers.
>
> Would a thread local GC be possible, and desirable? To my understanding,
> which is not much, that means the GC will only run in one thread (or
> multiple) and only needs to stop that/those thread(s). That also means
> it only need to search for dead objects in the heap/storage area for
> that particular thread (and where these point to).
>
> If I understand this correctly this would be perfect for D since
> everything is thread local by default.
>
> There's also a global heap for global objects or objects shared between
> threads.
It certainly would be possible. But I believe it requires thread-local
heaps, and some way of keeping track of when an object changes owning
thread.
Perhaps a mark phase could run on each thread's heap, and unreferenced
objects be moved to a global list of potentially dead objects. If after
all threads have run a mark, none have claimed the objects, they're
collected.
Then again, I'm hardly a GC architect.
--
Simen
More information about the Digitalmars-d-announce
mailing list