[Gc] Collection frequency

Hans Boehm Hans.Boehm at hp.com
Fri May 7 08:45:09 PDT 2004

The best way to reduce heap size is generally to increase
GC_free_space_divisor, e.g. to 8 or 10.

But in either case, you shouldn't be seeing unbounded heap growth.
If your heap is much larger than twice the live object size, you
probably have a very small heap, a very large root set, or a bug.

Note that with win32 graphics applications, there appears to be an
occasional problem with the GC accidentally tracing the graphics
buffer.  There are partial workarounds for that in very recent
versions of the collector.  It can have the symptoms you


On Thu, 6 May 2004, Clyde Kessel wrote:

> We are adding the garbage collector to a product built with C++ on
> WIN32.
> The product allocates scads of small objects and your garbage collector
> seems to gather them up quite nicely, thankyou.
> This question relates to choosing the correct frequency to run the
> non-incremental collections.  Currently, in order to minimize overhead,
> the collector runs less frequently as the heap grows.  That may minimize
> overhead, but it seems to miss the point.  As the heap grows, the risk
> of over committing real memory increases, and the need for collections
> increases.  I even worry about an instability in the current system, as
> the heap grows, collections diminish, causing the heap to grow
> faster.....
> Is there a way to change or tune the algorithms to get a behavior which
> takes into account these problems (and keeps overhead small :-)?
> - clyde
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> https://www.hpl.hp.com/hosted/linux/mail-archives/gc/

More information about the Gc mailing list