General Problems for GC'ed Applications?

Karen Lanrap karen at digitaldaemon.com
Fri Jul 28 18:11:29 PDT 2006


Walter Bright wrote:

> 5) When you use -lg, what the code appears to do is allocate new
> memory blocks. But since the old blocks are *still actively
> pointed to*, they won't be released by the GC.

They are not *actively pointed to* from any location and the GC is 
releasing them. Otherwise the program would acquire more and more 
memory as one can see with the "-l" option which enables only the 
leak but not the GC.

There are strong connected components(scc) of about 1MB size.
The only pointer to them is assigned to with a new scc, thereby 
insulating this scc to garbage, ready to be collected in case they 
are not deleted manually.

If they are not deleted manualy and the GC is enabled and collects 
them, then the OS does not swap out the other data anymore. Why?

That is exactly the scheme that was said not to happen.

In case of "<exeName> <mem> 100" there are only 100MB of data touched 
but the OS holds all <mem> data. That is why I believe the GC touches 
all of the <mem> data in search for blocks to collect.

If I am wrong, why is the OS disabled to swap out all untouched data, 
as soon as the GC is enabled?  



 



More information about the Digitalmars-d mailing list