]> granicus.if.org Git - gc/commit
Added long weakref support.
authorZach Saw <zach.saw@gmail.com>
Mon, 19 Nov 2012 01:34:10 +0000 (12:34 +1100)
committerZach Saw <zach.saw@gmail.com>
Mon, 19 Nov 2012 01:35:17 +0000 (12:35 +1100)
commit0eeed716b14f7c6db4bce73fe52f20164223f3a0
treef561c245e40d90b529a9d108836accc289946177
parentdf392f378463ae22e7b0f9da253dd13aa3840d9f
Added long weakref support.

* include/gc.h: Added 3 GC_API functions for long weakref support:
GC_register_long_link, GC_unregister_long_link and GC_move_long_link.
* include/gc.h: Added corresponding GC_REGISTER_LONG_LINK macros.
* finalize.c: Add implementation of the above functions,
GC_ll_hashtbl for long links and GC_old_ll_entries.
* finalize.c (GC_push_finalizer_structures): GC_push_all long link
hash table entries as well.
* finalize.c (GC_dump_finalization): Refactored dump
disappearing link code out to GC_dump_finalization_links accepting
an argument of pointer to struct dl_hashtbl_s.
* finalize.c (GC_print_finalization_stats): Added long link stats
print out.
* finalize.c (GC_finalize): Added saving current GC_ll_hashtbl
entry count to GC_old_ll_entries,
GC_make_disappearing_links_disappear and
GC_remove_dangling_disappearing_links for long links.
finalize.c
include/gc.h