Front page | perl.perl6.internals |
Postings from August 2005
August 31, 2005 16:04
Message ID: 4316374F.firstname.lastname@example.org
today is the deadline for the google summer of code projects, and it's
time anyway for a "release" of GMC.
GMC is a generational garbage collector for parrot that allows copying
of objects and thus copying GC schemes.
There are two main parts :
- The first is a new object definition (see include/parrot/pobj.h and
include/parrot/smallobject.h) that splits them in two parts : a
variable-sized body that can be moved and is private to the parrot
internals, and a fixed header that the rest of the world will be able to
see. Of course, this needs special procedures for allocation, so it will
work only with GMC. This should also allow pmc to use bodies of the size
they want and removes the need of PMC_ext structures.
- The second part is, of course, the GC itself. It uses the algorithm
that has been previously discussed on p6i (with small modifications) and
is described in detail in docs/dev/gmc.pod
Unfortunately, it is not (yet) 100% bug free. make test currently
reports 99.64% of good tests (it fails 10/2758). The bugs in t/op/gc.t
are all (save may be one) related to timely destruction that, for a
reason I have not yet been able to find, does not work. Detailed output
of make test failures can be found at
http://perso.ens-lyon.fr/alexandre.buisse/gmc/failed_tests (this will
hopefully be updated when some progress is made). Also, as weird as it
sounds, make test hangs on t/op/gc.t:15 while simply segfaulting if run
separately. It is strongly advised to "killall parrot" at this time.
But for any code that does not require timely destruction (and may be
streams), I feel pretty confident that it will work fine. Bugfixes are
of course welcome :)
Some obvious optimizations are also missing, so it's not time yet to run
benchmarks and see if it is a real benefit for performances. This will
come soon, I hope.
GMC won't be merged in trunk right away but you can still access it in
the dedicated branch. If I remember correctly, the last merge with trunk
occured around r8900, so it should not be too old. To access it, simply
svn co https://svn.perl.org/parrot/branches/gmc
GMC is enabled by default, you can turn it on or off in
If people are willing to test real programs with it, it would really be
And big thanks to leo which has helped me a lot for this.