Re[2]: [Gc] weak maps and libgc
Ivan Maidanski
ivmai at mail.ru
Fri Nov 4 04:58:04 PST 2011
Hi Andy,
Look good to me. I've checked it into my working tree (and commit in several days I hope).
I've done one change to the proposed function - in case dest==src, it now returns success (instead of GC_DUPLICATE).
Also, I've added some tests regarding the function.
Regards.
26 10 2011, 20:18 Andy Wingo <wingo at pobox.com>:
> 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
>
>
>
> --
> http://wingolog.org/
More information about the Gc
mailing list