gc_ms2_tuning branch

Luben Karavelov karavelov at spnet.net
Tue Sep 28 13:29:07 UTC 2010


On Tue, 28 Sep 2010 14:52:12 +1000, Vasily Chekalkin <bacek at bacek.com>
wrote:
> Hello.
> 
> On Tue, Sep 28, 2010 at 12:19 AM, Nick Wellnhofer
> <wellnhofer at aevum.de> wrote:
>>> Yes, main purpose of using lists was to simplify GenGC implementation.
>>> If we want to use your approach we have implement compacting to avoid
>>> sweeping all memory after marking young generations.
>>
>> Can't we use an array that holds all the PMC pointers of the young
>> generation?
> 
> We can use same approach as Pool_Allocator - allocate 4k chunks and
> store pointer to "next free cell". Using plain old C arrays will be
> too slow because we need to remove items from middle of list.


If we have 3 generations (as I understand the work done by vassily)
can't we have:

a. 1 array for ancient generation
b. 1 array for old generation
c. 1 array for new generation  (if we need it)
d. 1 array that holds objects from old and ancient generations that
   were modified since last GC run.

If we use this scheme, the object that have to be checked on minor GC
run 
(checking only the youngest object) is to check objects in arrays "c"
and 
"d", and then we empty array "d". What we also gain in this approach is

that  we do not swap vtables back on older objects - when they are old 
or ancient then do not move back in younger generation.

best regards


-- 
Luben Karavelov
Research and development
Spectrum Net JSC

36, D-r G. M. Dimitrov Blvd.
1797 Sofia
Mobile: +359 884332140
url: www.spnet.net


More information about the parrot-dev mailing list