www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Just listened to Mr. Lucarella's Garbage Collection Presentation and

reply "WhatMeWorry" <kc_heaser yahoo.com> writes:
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
next sibling parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
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
prev sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
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
May 21 2013