[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 02/04: Ensure weak sets are occasionally vacuumed.

From: Ludovic Courtès
Subject: [Guile-commits] 02/04: Ensure weak sets are occasionally vacuumed.
Date: Mon, 23 Mar 2020 17:50:32 -0400 (EDT)

civodul pushed a commit to branch master
in repository guile.

commit 02e3dc6ab95fe51786b68a8200322e163f8da478
Author: Ludovic Courtès <address@hidden>
AuthorDate: Mon Mar 23 21:36:09 2020 +0100

    Ensure weak sets are occasionally vacuumed.
    Just like in dc8dda77e0c937abae42a76ea88c6e7995adbd9a, 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 <>.
    * libguile/weak-set.c (weak_set_add_x): When 'set->items > set->upper',
    call 'vacuum_weak_set'.
 libguile/weak-set.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libguile/weak-set.c b/libguile/weak-set.c
index 8cf1b82..e71af9a 100644
--- a/libguile/weak-set.c
+++ b/libguile/weak-set.c
@@ -563,6 +563,7 @@ weak_set_add_x (scm_t_weak_set *set, unsigned long hash,
       if (set->n_items > set->upper)
         /* Full set, time to resize.  */
+          vacuum_weak_set (set);
           resize_set (set);
           return weak_set_add_x (set, hash >> 1, pred, closure, obj);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]