From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Hahnfeld via "Developers list for Guile, the GNU extensibility library" Newsgroups: gmane.lisp.guile.devel Subject: Re: GC + Java finalization Date: Fri, 19 Nov 2021 15:52:02 +0100 Message-ID: References: <9ce77d5e08d50456eddc575179b68ac17afc9bf6.camel@hahnjo.de> <1cc3648e5196bf23023ec7a0ab95a9ad46f8554c.camel@telenet.be> <497caf03e995dd3cad9df748a2e5e7e5e8a245eb.camel@telenet.be> <5f9eec1969de97273cb0c335587ba98080225f6e.camel@hahnjo.de> Reply-To: Jonas Hahnfeld Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-HEqP+NEOFn43ErRxDTRF" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16864"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.42.1 To: Maxime Devos , guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Nov 19 15:53:06 2021 Return-path: Envelope-to: guile-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 1mo5GD-0004Ai-Vw for guile-devel@m.gmane-mx.org; Fri, 19 Nov 2021 15:53:06 +0100 Original-Received: from localhost ([::1]:35896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo5GC-0004zg-Tc for guile-devel@m.gmane-mx.org; Fri, 19 Nov 2021 09:53:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo5FP-0004Ao-Dv for guile-devel@gnu.org; Fri, 19 Nov 2021 09:52:19 -0500 Original-Received: from [2a03:4000:2a:2c1::1] (port=57440 helo=mail.hahnjo.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo5FN-0006L0-Br for guile-devel@gnu.org; Fri, 19 Nov 2021 09:52:15 -0500 Original-Received: from [IPv6:2001:16b8:1e92:200:6657:51b0:48f8:9366] (unknown [IPv6:2001:16b8:1e92:200:6657:51b0:48f8:9366]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hahnjo.de (Postfix) with ESMTPSA id 982265429641; Fri, 19 Nov 2021 15:52:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hahnjo.de; s=default; t=1637333530; bh=agPA4IVZgEiuj3lUXSdU0scSd/JAeG9QAIT714nmR+U=; h=Subject:From:To:Date:In-Reply-To:References; b=eOPUfUixrD7I457U47iJo52CvCDQgDCa5thTrgGYQNsVyrGt1z7PNDhE+NL7xGE7f Uo/vJZjD5JRU5xea8/ZGjqFhkJeH7/lUWHPcEQgj0BDzBKfevXNgva1fNcuQ1mxi3r XiXfLDSFeozUg7BpwtNzFgwyXK2ssIgAFPK6XmrP0+8CD2hnLDYgUlYNhpb03hZL95 ghLEu9cFnwTMzUPGwqFg7GANBc70P+nKq3vI+JtgNuCuUbjxtdKz62CmTx2E+9cESa kg8+YWDVDsfsQ5uyfkGzoYc9KqXTHOmgOx6oyuaYQEzsexQMgR5h6w5iVITRUcN6kH f87E8eBhmu4tQ== In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a03:4000:2a:2c1::1 (failed) Received-SPF: pass client-ip=2a03:4000:2a:2c1::1; envelope-from=hahnjo@hahnjo.de; helo=mail.hahnjo.de X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20972 Archived-At: --=-HEqP+NEOFn43ErRxDTRF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Freitag, dem 19.11.2021 um 14:14 +0000 schrieb Maxime Devos: > Jonas Hahnfeld schreef op vr 19-11-2021 om 14:55 [+0100]: > > Am Freitag, dem 19.11.2021 um 13:48 +0000 schrieb Maxime Devos: > > > Jonas Hahnfeld schreef op vr 19-11-2021 om 14:32 [+0100]: > > > > > > -=C2=A0 rx =3D scm_gc_malloc_pointerless (sizeof (regex_t), > > > > > > "regex"); > > > > > > +=C2=A0 rx =3D scm_malloc (sizeof (regex_t)); > > > > >=20 > > > > > If the regex why scm_gc_malloc_pointerless -> scm_malloc? > > > > > Is rx not pointerless? > > > >=20 > > > > Not sure I understand the question. We don't know what contents > > > > libc > > > > will write into regex_t. It could be pointers which would be bad > > > > for > > > > the garbage collector. > > >=20 > > > OK, if that's the case, seems like a bug in the original code, not > > > related to Java-style finalisation, so I would do that in a > > > separate > > > patch. >=20 > From your other responses, I now know it is actually related to (non- > )Java style finalisation, but my comment about =E2=80=98separate patch=E2= =80=99 still > seems to apply: >=20 > >=20 > > Again, as replied in July to the same comment, it *is* a separate > > patch for exactly this reason. >=20 > More concretely, it is in the same patch as that modified > libguile/random.c. The patch to libguile/random.c doesn't seem to > be for non-Java finalization reasons. Going by the commit message, > the only possible reason I could find is: >=20 > =E2=80=98There is no point in registering memory with the garbage collect= or > if it doesn't need to do its job=E2=80=99 >=20 > But I don't see any =E2=80=98registering memory=E2=80=99, only replacing > scm_gc_calloc+scm_gc_free by scm_calloc+free, and without any > finalisation in sight. Unless you mean with =E2=80=98registering memory= =E2=80=99 > the "random bignum chunks" argument. But that still seems unrelated > to non-Java finalization. Any memory allocation through gc implicitly registers the memory. Both changes are unrelated to finalization, they are there to avoid this unnecessary registration. My previous replies only tried to clarify why any other solution is worse. Another question: Do you actually have permission to apply my patches? You already reviewed my patches in July, but as they weren't applied back then, does this mean we need somebody else to actually get them in? Jonas --=-HEqP+NEOFn43ErRxDTRF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEXw/5YGpL6H9VOgO2kcnDPSxhrNsFAmGXuhIACgkQkcnDPSxh rNsw2QgAqv/CKIvu5raaJ9S4GEr3uc0zPGGd9nO/CCuWHQi+SkuMLoqREmrggD7m OMWU4Rs2nSzCrvgtTNbfjfcmp2zC0DygL++WrZyMHdxA2qdcAjTBL/ljVmPteiBp 6aeOErr1eHZ0/Q9MSlcHX1aGmUk7NkEcLZNQ/P9PxQZanO47UNTCLXNspw+uZHjE FDkk92M6NdGhjo9zJznE7+RfRNPdMZD4OzWPM+Ap60u9jlyNaP1SeMgk2Cr0eN7Q ZfYsHH53UET5QH/lDgwvCcW9jWs2wwrikNqSvAVfp5Ygpne6uzuEsJPO8uRm9flt 4ZFsDkRqCmI9rqoiPRse9LZstQqn1w== =jgQg -----END PGP SIGNATURE----- --=-HEqP+NEOFn43ErRxDTRF--