[Gc] PRINT_STATS kind, and free_space_divisor

Rutger Ovidius r_ovidius at eml.cc
Mon Nov 22 19:54:41 PST 2004


Monday, November 22, 2004, 3:52:37 PM, you wrote:

BH> Here's a completely untested patch against CVS gcc/boehm-gc,
BH> though it would probably apply anywhere:

I applied this patch and the app hasn't crashed yet. (win32(xp) --
I haven't tried it on linux yet.)

The static root size is now 6 megs where it used to be 15.

But, after a while of doing basically nothing, it grows to 12 megs.
What could cause such a dramatic increase (all at once it seems). Is
it normal that the root set will constantly grow if only temp
objects are being used (strings) and no new major objects are being
permanently referenced by the app? From the gc.log, the collection
with the total size jump to:

Total size: 12283904

Has these two noticably large additions:

BaseAddress = 4d00000, AllocationBase = 4d00000, RegionSize = 1d2000(1908736)
  AllocationProtect = 4, State = 1000, Protect = 4, Type = 20000
..
BaseAddress = 5500000, AllocationBase = 5500000, RegionSize = 3de000(4055040)
  AllocationProtect = 4, State = 1000, Protect = 4, Type = 20000

I don't understand what activity could cause such a large addition to
the static roots. The app was fully loaded, and doing nothing special.


On the heap side, I'm still not sure how to understand these printed
stats. In gc.log I see sections like the following:

Total heap size: 21938176
...
Total of 6873088 bytes on free list

***Blocks in use:
(kind(0=ptrfree,1=normal,2=unc.,3=stubborn):size_in_bytes, #_marks_set)
(0:40,79)(1:152,4)(1:40,58)(0:2048,2)(0:1024,4)(4:256,8) .....
blocks = 3077, bytes = 15065088

Which I assume tells me exactly the size of stuff on the heap.
(15065088 + 6873088 = 21938176)

But, when I manually count (using awk) the size_in_bytes of
these 3077 blocks that were printed, I total 2869356 bytes. So, I have
a heap that large storing ~3 megs of data? I don't understand this
disparity. I guess it has something to do with HBLKSIZE since the
reclaim.c:GC_print_block_descr() function recalculates size_in_bytes
based upon it, but I don't fully understand this yet. Any insight? Is
this normal?

Thanks.


Full gc.log (gc2.zip, 377k)
http://tinyurl.com/676kv

Regards,
Rutger Ovidius




More information about the Gc mailing list