[Gc] Newbie: how to deal with a giant linked list?
J.Wielemaker at vu.nl
Mon Dec 19 06:57:39 PST 2011
On 12/19/2011 10:09 AM, Andy Wingo wrote:
> On Sun 18 Dec 2011 20:04, Jan Wielemaker<J.Wielemaker at vu.nl> writes:
>> On 12/18/2011 01:15 PM, Andy Wingo wrote:
>>> On Sun 18 Dec 2011 12:41, Jan Wielemaker<J.Wielemaker at vu.nl> writes:
>>>> So - Why does stuborn not help here? Note that it does help
>>>> in places where we have large non-mutable objects.
>>> I think stubborn is deprecated. From gc/gc.h:
>>> /* Note that the GC_malloc_stubborn support doesn't really exist */
>>> /* anymore. MANUAL_VDB provides comparable functionality. */
>>> Did you look at the MANUAL_VDB stuff in the source? It might help. I
>>> don't know anything about that code though.
>> Thanks. I've seen that remark, but I failed to find a more high-level
>> description on what MANUAL_VDB means. What did I miss?
> There's a comment somewhere in os_dep.c:2500 or so. "VDB" apparently
> stands for "virtual dirty bits".
Thanks. After quite a bit of reading I start to get the picture. All
this only seems to make sense when enabling incremental GC. On Linux,
the dirty pages are managed by mprotect() and segv-handling, so there is
no need for MANUAL_VDB. I've ran some tests. The system seems a bit
unstable. With print-stats enabled, I see messages like this:
--> Marking for collection 33 after 265325312 allocated bytes
Marked from 16236 dirty pages
Collection 32 reclaimed 905488 bytes ---> heapsize = 1126653952 bytes
World-stopped marking took 1680 msecs (364 in average)
Heap contains 986836032 pointer-containing + 105364736 pointer-free
0 finalization table entries; 0 disappearing links alive
0 objects are eligible for immediate finalization; 0 links cleared
Finalize plus initiate sweep took 0 + 20 msecs
So it appears to do incremental marking. Only, the total time goes
up rather than down (60->90 sec) :-(
Any other experience in using the collector in the presence of many
allocated objects that are most of their life unmodified and
Thanks --- Jan
More information about the Gc