]> granicus.if.org Git - gc/commit
Fix unbounded heap growth in case of intensive disappearing links usage
authorIvan Maidanski <ivmai@mail.ru>
Tue, 20 Mar 2018 21:58:24 +0000 (00:58 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 20 Mar 2018 21:58:24 +0000 (00:58 +0300)
commitb04b346006b34ec371fb8f002ba56522ee033131
tree92b1fa5df920181a1c1752e7a219554ec6f3fdc2
parent2e8c66c62b648aadb4929b9f23ede47eea0a43f5
Fix unbounded heap growth in case of intensive disappearing links usage

Issue #182 (bdwgc).

* finalize.c (GC_ON_GROW_LOG_SIZE_MIN): New macro.
* finalize.c (GC_grow_table): Rename size_ptr to log_size_ptr in
comment; add entries_ptr argument; add comment; call if log_old_size is
GC_ON_GROW_LOG_SIZE_MIN or bigger then call GC_try_to_collect_inner
and, then, return from the function if the number of entries is less
than 75% of the table capacity.
* finalize.c (GC_register_disappearing_link_inner): Pass
dl_hashtbl->entries pointer to GC_grow_table.
* finalize.c (GC_register_finalizer_inner): Pass GC_fo_entries pointer
to GC_grow_table.
finalize.c