[Gc] Re: Understanding why GC'ing increases to the double in time?
Martin Egholm Nielsen
martin at egholm-nielsen.dk
Mon Mar 13 05:53:37 PST 2006
>> It may well be that your operation A allocates and drops a moderately
>> large strongly-connected data structure, and operation B stores some
>> large integers in a place in which they are conservatively scanned, and
>> appear to point to the first data structure. There are probably other
>> possible scenarios along these lines, and some of them probably involve
>> real pointers, instead of misidentified ones.
> My pursue continues, and I'm now able to provoke it by taking operation
> A (the complex one) out of the picture, and invoking some other rather
> simple operation C.
> That made me suspect that the dropping of "large strongly-connected data
> structure" you're referring to in the above, is something I drop during
> the initialisation of my application.
> However, I tried removing some things in order to make the init-phase
> simpler, but nevertheless - I still get the 600k composite increase.
> So, I guess I'm kinda stuck until I get a hint to what these extra 600k
> may consist of, or some other ideas :-)
For what it's worth I now added a printf statement to ADD_TO_COMPOSITE:
# define ADD_TO_COMPOSITE(sz) \
GC_composite_in_use += (sz); \
if ( sz > 100 ) GC_printf1("MEN adding composite with size %lu\n", (sz) ); \
and there is indeed a single increase for one object:
=== Small time ===
MEN adding composite with size 21506
=== Large time ===
MEN adding composite with size 172034
And this increase does indeed accommodate for the ~600k bytes.
And maybe I can just dump this object - byte for byte - to see what it is?
More information about the Gc