Thread overview
What is std.gc.minimize() for?
Aug 03, 2006
Serg Kovrov
Aug 03, 2006
Hasan Aljudy
Aug 03, 2006
Frank Benoit
Aug 03, 2006
Serg Kovrov
Aug 03, 2006
Frank Benoit
August 03, 2006
Is this _gc.minimize() implemented, and what exactly it suppose to do?

Thanks
--
serg.
August 03, 2006

Serg Kovrov wrote:
> Is this _gc.minimize() implemented, and what exactly it suppose to do?
> 
> Thanks
> -- 
> serg.

hmm .. looking at src/phobos/std/gc.d shows that nothing is implemented!! (ok well, let's hope it's implemented somewhere else)
August 03, 2006
> hmm .. looking at src/phobos/std/gc.d shows that nothing is implemented!! (ok well, let's hope it's implemented somewhere else)


looking at src/phobos/internal/gc/gcx.d shows that there is something implemented!!
August 03, 2006
Frank Benoit wrote:
>> hmm .. looking at src/phobos/std/gc.d shows that nothing is
>> implemented!! (ok well, let's hope it's implemented somewhere else)
> 
> looking at src/phobos/internal/gc/gcx.d shows that there is something
> implemented!!

I see an empty method with 'not implemented' comment, what do you see there, Frank?
August 03, 2006
Serg Kovrov schrieb:
> Frank Benoit wrote:
>>> hmm .. looking at src/phobos/std/gc.d shows that nothing is implemented!! (ok well, let's hope it's implemented somewhere else)
>>
>> looking at src/phobos/internal/gc/gcx.d shows that there is something implemented!!
> 
> I see an empty method with 'not implemented' comment, what do you see there, Frank?

:)

src/phobos/std/gc.d is a stub and because of that, all functions are empty. I only wanted to point to the file, where the implementations are located. So you are able to take a deeper look on it and can see for yourself what is implemented and what not.

Minimize() is only useful for a compacting GC. Also
gc.enable()/gc.disable() exist and are not implemented (only useful for
a concurrent GC).
They only exist to enable you to write code, which is compatible also
with other potential implementations of the GC.

For general GC information: http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29 The phobos GC is a Stop-the-world, conservative, mark-and-sweep and finalizing implementation.