GC encapsulation

Vasily Chekalkin bacek at bacek.com
Wed Jan 6 21:44:02 UTC 2010


Hello.

After recent play with Boehm GC and Parrot's GC I have next "roadmap" 
for properly encapsulate GC in Parrot. It will give us ability to 
implement almost any kind of GC without reworking all things.

1. Extend GC_Subsystem struct with next functions:
   a) allocate_pmc_header(flags)
   b) allocate_string_header(flags?)
   c) allocate_attributes(pmc_enum)
   d) allocate_raw_buffer - to allocate buffer without pointers. Useful 
for Strings, FixedIntegerArray, etc.
   e) allocate_buffer - buffer which can contains pointers.

2. Change various Parrot_gc_foo functions to use it instead of 
interp->mem_pools and remove interp->mem_pools.

3. Change current MS GC to allocate mem_pools in 
GC_Subsystem->gc_private attribute.

Any thought/ideas/objections? If no one will complain I'll try to 
implement it over weekend so we can ship it with 2.0.

-- 
Bacek


More information about the parrot-dev mailing list