[Q] Collectin lots of garbage

Martin Drautzburg martin.drautzburg at web.de
Wed Oct 1 06:16:34 UTC 2003


John M McIntosh <johnmci at smalltalkconsulting.com> writes:

 
> In your case once the 100K object is tenured, the cost is non-existent
> unless
> 
> a full GC occurs. When it's disposed of, the mark phase, which is
> looking for live objects
>
> Once the objects are tenured then when they are collected depends
> because that requires a full GC which are rare or forced events. If
> the  objects still are in new space then they'll be collected in most
> likely  a few ms in

The reason I am asking is because I made the following observation:

I compute the amount of garbage in the tree by counting all instances
of tree nodes and the number of tree nodes that are connected to the
root. The difference between the two numbers is the garbage. (I *know*
there are no other references from outside the tree).

When I chop off a branch I can see the amount of garbage increase but
it remains garbage for at least many minutes (I haven't yet seen it
go, because I was always too imatient). When I select "space left"
from the world menu It sometimes returns instantly and sometimes it
takes about a minute. Then eventually the garbage is collected. 

My feeling is that it is only collected by the "long" "space left"
runs. So I suspect that incremental garbage collecting will never
collect this kind of garbage and a full GC takes a long time.

Could that be the case ?

Also saving the image sometimes takes a long time. Is there a full GC
before the image is saved ?



More information about the Squeak-dev mailing list