From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#40194: Weak sets keep growing Date: Mon, 23 Mar 2020 15:17:46 +0100 Message-ID: <87h7yfqho5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="19411"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: bug-Guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Mar 23 15:18:15 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGNuA-0004wF-6Z for guile-bugs@m.gmane-mx.org; Mon, 23 Mar 2020 15:18:14 +0100 Original-Received: from localhost ([::1]:34393 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGNu9-0004Pe-8S for guile-bugs@m.gmane-mx.org; Mon, 23 Mar 2020 10:18:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38743) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGNu0-0004KO-8o for bug-guile@gnu.org; Mon, 23 Mar 2020 10:18:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGNty-0007eT-95 for bug-guile@gnu.org; Mon, 23 Mar 2020 10:18:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47391) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGNty-0007eM-61 for bug-guile@gnu.org; Mon, 23 Mar 2020 10:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jGNty-0002tP-32 for bug-guile@gnu.org; Mon, 23 Mar 2020 10:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 23 Mar 2020 14:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40194 X-GNU-PR-Package: guile Original-Received: via spool by submit@debbugs.gnu.org id=B.158497307211100 (code B ref -1); Mon, 23 Mar 2020 14:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Mar 2020 14:17:52 +0000 Original-Received: from localhost ([127.0.0.1]:53364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGNto-0002sy-2y for submit@debbugs.gnu.org; Mon, 23 Mar 2020 10:17:52 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGNtm-0002sr-T9 for submit@debbugs.gnu.org; Mon, 23 Mar 2020 10:17:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38683) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGNtl-000465-U2 for bug-Guile@gnu.org; Mon, 23 Mar 2020 10:17:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jGNtl-0007XT-Pf for bug-Guile@gnu.org; Mon, 23 Mar 2020 10:17:49 -0400 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42988 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jGNtl-0002mq-8B for bug-Guile@gnu.org; Mon, 23 Mar 2020 10:17:49 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Germinal an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9686 Archived-At: Hello, Consider this code: --8<---------------cut here---------------start------------->8--- (define (create-symbols) (let loop ((i 10000)) (unless (zero? i) (gensym) (loop (1- i))))) (let loop ((i 10)) (unless (zero? i) (pk i (%symbols)) (create-symbols) (loop (1- i)))) --8<---------------cut here---------------end--------------->8--- (You need to have the =E2=80=98%symbols=E2=80=99 procedure from libguile/sy= mbols.c compiled in.) In 3.0.1+, it prints: --8<---------------cut here---------------start------------->8--- ;;; (10 #) ;;; (9 #) ;;; (8 #) ;;; (7 #) ;;; (6 #) ;;; (5 #) ;;; (4 #) ;;; (3 #) ;;; (2 #) ;;; (1 #) --8<---------------cut here---------------end--------------->8--- The size of the weak set keeps growing, even when GC happens. Conversely, weak tables shrink upon GC. Ludo=E2=80=99.