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.
Any chance of the code being documented extensively in the hopes that it would encourage participation/experimentation? Thanks for all the work you guys have put in.
-- Alex Rønne Petersen [email protected] http://lycus.org
