[Gc] weak maps and libgc

Andy Wingo wingo at pobox.com
Wed Oct 26 09:18:09 PDT 2011


On Wed 26 Oct 2011 10:18, Ivan Maidanski <ivmai at mail.ru> writes:

>>  (2) a function to move disappearing links, perhaps callable only
>>      within the alloc lock.
>> 
>>      I did some profiling today with the open-addressed table.  It has
>>      to shuffle items around sometimes.  Unregistering then registering
>>      disappearing links shows up pretty high on the profile.
>
> Is my understanding correct - you want to optimize the following:
>
> // assume GC_general_register_disappearing_link(&link, obj1);
> ...
> GC_unregister_disappearing_link(&link);
> GC_general_register_disappearing_link(&link, obj2);
>
> Right? If yes, I don't mind again.

Patch attached.  WDYT?

Andy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-add-GC_move_disappearing_link.patch
Type: text/x-diff
Size: 4483 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20111026/98997956/0001-add-GC_move_disappearing_link-0001.bin
-------------- next part --------------

-- 
http://wingolog.org/


More information about the Gc mailing list