Thread overview | |||||
---|---|---|---|---|---|
|
May 21, 2013 Just listened to Mr. Lucarella's Garbage Collection Presentation and ... | ||||
---|---|---|---|---|
| ||||
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 Re: Just listened to Mr. Lucarella's Garbage Collection Presentation and ... | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | 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 Re: Just listened to Mr. Lucarella's Garbage Collection Presentation and ... | ||||
---|---|---|---|---|
| ||||
Posted in reply to WhatMeWorry | 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
|
Copyright © 1999-2021 by the D Language Foundation