[Gc] Related to static root set

Boehm, Hans hans_boehm at hp.com
Wed Feb 11 09:31:24 PST 2004


The static root set should contain all statically allocated variables that may point
to the garbage-collected heap.  On the most common platforms that includes all static
data segments associated with all dynamic libraries (or the main program).  If you are on
a platform that does not support dynamic libraries, or one on which the collector doesn't
understand how to find dynamic library data segments, only the segment for the main
program will be included.

GC_mem_found can be legitimately negative at times, since the size of objects that were
still on the free list when the GC started are subtracted from it.  (This makes sense,
since the free lists are cleared, and memory that was originally on those lists is not
really reclaimed by the collector.  By the next GC it will usually, but not necessarily,
have been reclaimed again.)

Gctest should work even if the collector doesn't understand dynamic libraries.  If it doesn't,
it's good to look where it fails, and then make sure that the corresponding root variable
is included in one of the root sections or on the stack.  If it is on the stack, check that
the stack limits (e.g. GC_stackbottom) are set correctly.

Hans

-----Original Message-----
From: vasantha selvi
Sent: Wednesday, February 11, 2004 6:27 AM

Hi,
  What is static root set and based on what it is formed in GC? In my working platfrom..always the static root set is only from DATA start and DATA end...ie the number of root set always the one. And also the reclamation is not proper. Even sometime the GC_memfound comes in negative too. Anybody could help me out please.
Regards,
VS



More information about the Gc mailing list