Re: Recognising pointers during garbage collection?

Basile STARYNKEVITCH <basile@starynkevitch.net>
31 Jul 2003 12:35:47 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: Recognising pointers during garbage collection? ftu@fi.ruu.nl (2003-07-25)
Re: Recognising pointers during garbage collection? dobes@dobesland.com (Dobes Vandermeer) (2003-07-25)
Re: Recognising pointers during garbage collection? fjh@cs.mu.oz.au (Fergus Henderson) (2003-07-25)
Re: Recognising pointers during garbage collection? joachim.durchholz@web.de (Joachim Durchholz) (2003-07-25)
Re: Recognising pointers during garbage collection? qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk) (2003-07-25)
Re: Recognising pointers during garbage collection? cymric73@hotmail.com (Maarten D. de Jong) (2003-07-25)
Re: Recognising pointers during garbage collection? basile@starynkevitch.net (Basile STARYNKEVITCH) (2003-07-31)
Re: Recognising pointers during garbage collection? basile@starynkevitch.net (Basile STARYNKEVITCH) (2003-07-31)
Re: Recognising pointers during garbage collection? gneuner2@comcast.net (George Neuner) (2003-07-31)
Re: Recognising pointers during garbage collection? fjh@cs.mu.oz.au (Fergus Henderson) (2003-08-04)
Re: Recognising pointers during garbage collection? basile@starynkevitch.net (Basile STARYNKEVITCH) (2003-09-04)
Re: Recognising pointers during garbage collection? nmm1@cus.cam.ac.uk (2003-09-04)
| List of all articles for this month |

From: Basile STARYNKEVITCH <basile@starynkevitch.net>
Newsgroups: comp.compilers
Date: 31 Jul 2003 12:35:47 -0400
Organization: http://lesours.starynkevitch.net/ - Les Ours
References: 03-07-149 03-07-175
Keywords: GC
Posted-Date: 31 Jul 2003 12:35:47 EDT

>>>>> "Dick" == Dick Wesseling <ftu@fi.ruu.nl> writes:


        "Maarten D. de Jong" <cymric73@hotmail.com> writes:
        >> Can someone explain some of the more common techniques in
        >> uncooperative languages (like C) or cooperative ones (which you
        >> design yourself)?


        Dick> I never did a GC for an uncooperative language, so I can
        Dick> only answer the second part of your question. Consider
        Dick> Java. The symbol table of a Java program is part of the run
        Dick> time environment, it is defined by the Java Virtual Machine
        Dick> specification (the class file format). A storage allocator
        Dick> for Java will typically store a reference to the class of an
        Dick> object somewhere in the object. This is required for
        Dick> operations such as instanceof and run time evaluation of
        Dick> casts.


Java is not that cooperative w.r.t. to GC. For instance, the
finalizers of Java are a nightmare to implement efficiently (and the
multithreaded and synchronised methods).


I think that a better distinction is conservative vs precise
GC. Conservative GC for C are well known, see Boehm's (et al.) GC. But
you can have a precise GC for C, if you accept some strict (and
constraining) coding style. For example, Qish is a precise,
generational copying, garbage collector for (and in) C. It is
opensource -LGPL license- (but does not support yet
multithreading). You can get it from
http://freshmeat.net/projects/qish/ and glance its documentation on
http://www.starynkevitch.net/Basile/qishintro.html and get the current
version from http://www.starynkevitch.net/Basile/qish-0.9.tar.gz


If you happen to be interested by Qish, be nice to send me an email.


--


Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.