What is std.gc.minimize() for?

Frank Benoit keinfarbton at nospam.xyz
Thu Aug 3 15:59:12 PDT 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.




More information about the Digitalmars-d-learn mailing list