mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Ensure weak sets are occasionally vacuumed.
Just like in dc8dda77e0
, this ensures weak
sets are vacuumed in a timely fashion. It also works around the fact
that 'vacuum_all_weak_tables' isn't getting called more than a couple of
times, for some reason.
Partly fixes <https://bugs.gnu.org/40194>.
* libguile/weak-set.c (weak_set_add_x): When 'set->items > set->upper',
call 'vacuum_weak_set'.
This commit is contained in:
parent
168ad279e6
commit
02e3dc6ab9
1 changed files with 1 additions and 0 deletions
|
@ -563,6 +563,7 @@ weak_set_add_x (scm_t_weak_set *set, unsigned long hash,
|
||||||
if (set->n_items > set->upper)
|
if (set->n_items > set->upper)
|
||||||
/* Full set, time to resize. */
|
/* Full set, time to resize. */
|
||||||
{
|
{
|
||||||
|
vacuum_weak_set (set);
|
||||||
resize_set (set);
|
resize_set (set);
|
||||||
return weak_set_add_x (set, hash >> 1, pred, closure, obj);
|
return weak_set_add_x (set, hash >> 1, pred, closure, obj);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue