Alex Rønne Petersen, el 23 de August a las 16:38 me escribiste: > On 23-08-2012 15:21, Rory McGuire wrote: > >On Thu, Aug 23, 2012 at 2:51 PM, dsimcha <[email protected] > ><mailto:[email protected]>> wrote: > > > > Basically, the idea is to store information about what is and isn't > > a pointer at the pool level instead of at the block level. My > > attempt from a long time ago at precise heap scanning, and > > Antti-Ville's first attempt, stored meta-data at the end of every > > allocated block. This worked well for large arrays, but was > > terribly inefficient for smaller allocations and made the GC code > > even messier than it already is. The overhead was a fixed > > (void*).sizeof bits per block. Now, each pool has a bit array that > > contains one bit for every possible aligned pointer. The overhead > > is always 1 bit for every (void*).sizeof bytes no matter how large > > or small the block is. > > > > > >Am I correct in thinking that this is still single threaded stop the world? > > 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.
Feel free to use my work[1] to have a cloning collector which is not STW in the classical sense (it just STW for the time it takes to pause the threads and fork() the process), at least on *nixes. Works fairly well[2], even in production code. There's is only one issue[3], but a nasty one, because of a glibc internal lock shared between fork() and other glibc functions like malloc and the GC using signals to interrupt the threads. I hope I can fix this problem eventually (the ideal for me would be to find another way to pause the threads). [1] http://www.dsource.org/projects/tango/browser/trunk/tango/core/rt/gc/cdgc [2] http://www.llucax.com.ar/blog/blog/post/-1a4bdfba [3] http://www.dsource.org/projects/tango/ticket/2087 -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- Si por el chancho fuera, se autocomería con chimichurri Worshestershire!
