From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: weak hash tables Date: Sun, 07 Jul 2024 10:57:09 +0000 Message-ID: References: <878qyeffjh.fsf@localhost> <8734olzlws.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_u1Pt8FDVCDbfy1zxxoFnw92EwaKHUEtMQZmOOlm3s" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33042"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Helmut Eller , Ihor Radchenko , Eli Zaretskii , emacs-devel@gnu.org To: =?utf-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 07 13:07:25 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sQPjo-0008Li-1q for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Jul 2024 13:07:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQPj6-0007nL-EL; Sun, 07 Jul 2024 07:06:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQPa1-00052g-Nl for emacs-devel@gnu.org; Sun, 07 Jul 2024 06:57:17 -0400 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQPa0-00044L-5V for emacs-devel@gnu.org; Sun, 07 Jul 2024 06:57:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1720349832; x=1720609032; bh=6KNkwQoHqpepRebqVeFODSGEEiUr41DlX0CpEmFfHOc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=IPuHPl47Dx0Yqrk22BzXwuhiLcr7XWusYSKtW5/o5FUk/aBw69aptYR9pRYugxuZf GRBb/O1zi/CIZA5yTqMX5UEM8s5LUCjYTKzmIm8xRuyzAFw3zXmw38hSOYpfvhGBjW AITno+PcOrBHfBVElGLig8pvyk4ham6xigD4HqX7dPvnstpoOFRo57sweK2N/ogsI6 1QxwEBjfNyqKHh3/bKqh1uuf/a6ttlT0/4GGv4gPu29vdK6Gomz2g9hnue/jOelnjD qdp/gUE8lL6WE8gQEFEFFS9aCClfhyLQem1vIfGvb6A67nIbCWovaxRUKy7Mn9Yaij 1L8IsGnGDruIA== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: e99aebdbcdcbc6fbe95030a1c82f9916f288ba1c Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 07 Jul 2024 07:06:38 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321479 Archived-At: This is a multi-part message in MIME format. --b1_u1Pt8FDVCDbfy1zxxoFnw92EwaKHUEtMQZmOOlm3s Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sunday, July 7th, 2024 at 09:24, Gerd M=C3=B6llmann wrote: > Pip Cet pipcet@protonmail.com writes: > > > > Hm, maybe we are missing out on something here, in igc. I don't rem= ember > > > > that I balance in igc. > >=20 > > Do we remove intervals at all with igc? It looks to me like they're > > partially-weak objects, effectively, and we scan them strongly, > > removing them only when the buffer dies? >=20 >=20 > Balancing only changes the tree structure, without freeing nodes, AFAIR. > But that could be wrong. It's been a long time since I looked closer at > that tree. >=20 > Wrt to weakness, I don't think there are weak references. Oh, you're right! That's a relief. > The big > difference to the non-MPS case is that struct interval is subject to GC > at all, they are malloc'd without igc. I didn't see another way to > handle their plist otherwise. Making them malloc'd roots would have > meant too many roots for my taste. I have currently ca. 20.000 live > intervals for example, after GC. Does there have to be a big difference at all, or is it possible the test i= s broken on vanilla Emacs, and it just so happens that GC happens at the ri= ght time and hides that bug? The attached patch to Emacs master makes make -C test lisp/emacs-lisp/ert-tests run out of memory for me (again, on master, nothing special). I don't think= it should: all it does is modify the test that runs before. So is it possible this isn't all that MPS-specific? Pip --b1_u1Pt8FDVCDbfy1zxxoFnw92EwaKHUEtMQZmOOlm3s Content-Type: text/x-patch; name=0001-ert-tests.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-ert-tests.patch ZGlmZiAtLWdpdCBhL3Rlc3QvbGlzcC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbCBiL3Rlc3QvbGlz cC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbAppbmRleCAxYWZmNzNkNjZmNi4uNGNiNTIzZDJmZjEg MTAwNjQ0Ci0tLSBhL3Rlc3QvbGlzcC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbAorKysgYi90ZXN0 L2xpc3AvZW1hY3MtbGlzcC9lcnQtdGVzdHMuZWwKQEAgLTU2OSw3ICs1NjksNyBAQCBlcnQtdGVz dC1ydW4tdGVzdHMtYmF0Y2gKICAgICAgICAgKHNhdmUtd2luZG93LWV4Y3Vyc2lvbgogICAgICAg ICAgIChsZXQgKChjYXNlLWZvbGQtc2VhcmNoIG5pbCkKICAgICAgICAgICAgICAgICAoZXJ0LWJh dGNoLWJhY2t0cmFjZS1yaWdodC1tYXJnaW4gbmlsKQotCQkoZXJ0LWJhdGNoLXByaW50LWxldmVs IDEwKQorCQkoZXJ0LWJhdGNoLXByaW50LWxldmVsIDEpCiAJCShlcnQtYmF0Y2gtcHJpbnQtbGVu Z3RoIDExKSkKICAgICAgICAgICAgIChlcnQtcnVuLXRlc3RzLWJhdGNoCiAgICAgICAgICAgICAg YChtZW1iZXIgLGZhaWxpbmctdGVzdC0xICxmYWlsaW5nLXRlc3QtMikpKSkpCg== --b1_u1Pt8FDVCDbfy1zxxoFnw92EwaKHUEtMQZmOOlm3s--