Re: Storage management, was Compiler writers will love this language

Lex Spoon <lex@cc.gatech.edu>
4 Jul 2003 00:06:53 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: Compiler writers will love this language mwotton@cse.unsw.edu.au (2003-06-08)
Re: Compiler writers will love this language ericmuttta@email.com (2003-06-20)
Re: Compiler writers will love this language joachim.durchholz@web.de (Joachim Durchholz) (2003-07-02)
Re: Storage management, was Compiler writers will love this language joachim.durchholz@web.de (Joachim Durchholz) (2003-07-04)
Re: Storage management, was Compiler writers will love this language rodney.bates@wichita.edu (Rodney M. Bates) (2003-07-04)
Re: Storage management, was Compiler writers will love this language basile@starynkevitch.net (Basile STARYNKEVITCH) (2003-07-04)
Re: Storage management, was Compiler writers will love this language lex@cc.gatech.edu (Lex Spoon) (2003-07-04)
Re: Storage management, was Compiler writers will love this language mwotton@cse.unsw.edu.au (2003-07-04)
Re: Storage management, was Compiler writers will love this language blackmarlin@asean-mail.com (2003-07-04)
Re: Storage management, was Compiler writers will love this language stephen@dino.dnsalias.com (2003-07-17)
Re: Storage management, was Compiler writers will love this language monnier+comp.compilers/news/@cs-www.cs.yale.edu (Stefan Monnier) (2003-07-17)
Re: Storage management, was Compiler writers will love this language haberg@matematik.su.se (2003-07-17)
Re: Storage management, was Compiler writers will love this language lars@bearnip.com (2003-07-17)
[3 later articles]
| List of all articles for this month |

From: Lex Spoon <lex@cc.gatech.edu>
Newsgroups: comp.compilers
Date: 4 Jul 2003 00:06:53 -0400
Organization: Georgia Institute of Technology
References: 03-05-211 03-06-015 03-06-054 03-06-057 03-06-078 03-07-005
Keywords: storage
Posted-Date: 04 Jul 2003 00:06:52 EDT

Joachim's post is an excellent overview of automatic memory
management, but a couple of comments got under my skin. For the
record:




>> This scheme (reference-counting) is used in VB6 for instance.
>
> No, garbage-collected languages don't use reference counting.


Garbage collection is actually a general term that includes reference
counting. Note that no garbage collector is perfect, due to the
Infinite Employment Theorem for Compiler Writers. Good garbage
collection is as much of an optimization as, say, good register
allocation.






> > When I read its description, it sounded
>> like a rather elaborate scheme and one that would need a good deal of
>> implementation effort.
>
> That's true. Writing a good garbage collector takes several
> person-months or person-years.


Not necessarily. If nothing else, you can hook into the Boehm-Weiser
collector to get started:


> That's very correct. If you don't have a working garbage collector and
> don't have the budget for writing one, use reference counting.
> However, most of the time you have the Boehm-Demers-Weiser collector.
> It's written in C and will run on practically any hardware that can run C.


Also, the entire Squeak VM took only person-months to implement (I
don't know the exact time frame), and the garbage collector was just
one part of it.


Lex


Post a followup to this message

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