[Gc] weak maps and libgc

Andy Wingo wingo at pobox.com
Tue Oct 25 13:05:53 PDT 2011


Hi,

On Fri 21 Oct 2011 16:40, Ivan Maidanski <ivmai at mail.ru> writes:

> Could you please summarize your past writings about the
> implementations difficulties?  Thanks.

More concretely, I would be happy if:

 (1) There were a variant of GC_register_disappearing_link that also
     incremented an `unsigned long' somewhere in memory.  This would
     allow me to keep an accurate count of how many items are in a weak
     hash table, and remove my need to run something after GC.

 (2) There were 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.

 (3) It would be nice if there were a callback after GC.  It would let
     me accurately measure the time in GC, for example.  This isn't
     relevant to the current discussion though.

What do you think?  I am happy to look at coding up these features, but
I would like your input first.

Andy
-- 
http://wingolog.org/


More information about the Gc mailing list