Thread overview
Just listened to Mr. Lucarella's Garbage Collection Presentation and ...
May 21, 2013
WhatMeWorry
May 21, 2013
Ali Çehreli
May 21, 2013
a self referential question came to mind: what collects the garbage collector's garbage?  And I'm not trying to be a smart-alec here. I'm generally curious. Is a Garbage Collector written without garbage collection?


May 21, 2013
On 05/21/2013 08:18 AM, WhatMeWorry wrote:

> Is a Garbage Collector written without garbage collection?

Without knowing the details, I wouldn't be surprised. There are various memory management schemes. Here is a short article that lists some of them:

  http://dlang.org/memory.html

Unfortunately, it is pretty dated. Somebody should click [Improve this page] and fix some parts of it. :p At least the "scope storage class" is now replaced by Phobos's 'scoped'.

Ali

May 21, 2013
On Tue, 21 May 2013 11:18:25 -0400, WhatMeWorry <kc_heaser@yahoo.com> wrote:

> a self referential question came to mind: what collects the garbage collector's garbage?  And I'm not trying to be a smart-alec here. I'm generally curious. Is a Garbage Collector written without garbage collection?

The garbage collector manually manages its internal memory structures.  In general, there is no need to collect any GC memory, because it doesn't allocate any unless requested to do so.  When it does, any metadata lives as long as the memory lives.  In the cases where memory is returned to the OS (via GC.minimize), the metadata goes along with it.

-Steve