Re: Compile Time Garbage Collection impossible?

glen herrmannsfeldt <gah@ugcs.caltech.edu>
25 Sep 2006 17:05:17 -0400

          From comp.compilers

Related articles
[2 earlier articles]
Re: Compile Time Garbage Collection impossible? dido@imperium.ph (Rafael 'Dido' Sevilla) (2006-09-25)
Re: Compile Time Garbage Collection impossible? kym@ukato.freeshell.org (russell kym horsell) (2006-09-25)
Re: Compile Time Garbage Collection impossible? paul.biggar@gmail.com (Paul Biggar) (2006-09-25)
Re: Compile Time Garbage Collection impossible? firefly@diku.dk (Peter \Firefly\Lund) (2006-09-25)
Re: Compile Time Garbage Collection impossible? gneuner2@comcast.net (George Neuner) (2006-09-25)
Re: Compile Time Garbage Collection impossible? liekweg@ipd.info.uni-karlsruhe.de (Florian Liekweg) (2006-09-25)
Re: Compile Time Garbage Collection impossible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2006-09-25)
Re: Compile Time Garbage Collection impossible? torbenm@app-0.diku.dk (2006-09-25)
Re: Compile Time Garbage Collection impossible? liekweg@ipd.info.uni-karlsruhe.de (Florian Liekweg) (2006-09-26)
Re: Compile Time Garbage Collection impossible? alewando@fala2005.com (A.L.) (2006-09-28)
Re: Compile Time Garbage Collection impossible? torbenm@app-3.diku.dk (2006-09-28)
Re: Compile Time Garbage Collection impossible? sleepingsquirrel@yahoo.com (Greg Buchholz) (2006-09-28)
Re: Compile Time Garbage Collection impossible? bobduff@shell01.TheWorld.com (Robert A Duff) (2006-09-30)
[5 later articles]
| List of all articles for this month |
From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 25 Sep 2006 17:05:17 -0400
Organization: Compilers Central
References: 06-09-119 06-09-123
Keywords: GC, comment
Posted-Date: 25 Sep 2006 17:05:17 EDT

Rafael 'Dido' Sevilla wrote:


(snip)


> When you have dynamically allocated data structures, determining the
> scope of such an allocation is generally not so simple to determine
> statically. Think of what happens when you pass such an allocated data
> structure around among functions, which may put the pointer in different
> variables with different names, and even embed them inside of other
> dynamic data structures.


(snip)


It isn't always possible for run-time garbage collection, either.
Circular linked lists are an old favorite, where the links must
be broken before the GC will figure it out. It seems that it works
well enough most of the time, and compile time computation of when
to free things probably won't work well enough, but maybe sometimes
it will.


-- glen
[Mark and sweep collectors don't have any trouble with circular lists,
only reference counters. -John]


Post a followup to this message

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