www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - What is std.gc.minimize() for?

reply Serg Kovrov <kovrov no.spam> writes:
Is this _gc.minimize() implemented, and what exactly it suppose to do?

Thanks
--
serg.
Aug 03 2006
parent reply Hasan Aljudy <hasan.aljudy gmail.com> writes:
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)
Aug 03 2006
parent reply Frank Benoit <keinfarbton nospam.xyz> writes:
 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!!
Aug 03 2006
parent reply Serg Kovrov <kovrov no.spam> writes:
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?
Aug 03 2006
parent Frank Benoit <keinfarbton nospam.xyz> writes:
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.
Aug 03 2006