From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Newsgroups: gmane.lisp.guile.devel Subject: Re: [RFC,PATCH] Do not GC_INIT the Boehm GC if already initialized Date: Mon, 20 Feb 2023 11:06:54 +0100 Message-ID: <87k00clkg1.fsf@gnu.org> References: <87ttzybq3m.fsf@gnu.org> <42481ef3-1590-1aaa-aaf3-6405918dcbd5@telenet.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14997"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: "Jose E. Marchesi" , guile-devel@gnu.org To: Maxime Devos Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Feb 20 11:07:20 2023 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 1pU34p-0003fT-Rq for guile-devel@m.gmane-mx.org; Mon, 20 Feb 2023 11:07:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU34X-0006uM-CD; Mon, 20 Feb 2023 05:07:01 -0500 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 1pU34V-0006tF-8F for guile-devel@gnu.org; Mon, 20 Feb 2023 05:06:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU34T-0008ET-P9; Mon, 20 Feb 2023 05:06:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=MRfgcJFZroSmCows91qLc6ffagP+xLIIDS6j9nrrrl8=; b=RjVypYBWbY/+u5hJXsIE PLHSFNwjt1fsm9mwwc5I/HcxgPElg8jlJpOncsG8XxUVmd6EQDo/EfglrCO1pWBIeqw0MqjQ5pDP+ hSw72WhccE0y4RuFAzbN7hADKhHJ4ksH/FEKjNBDMgaHUuxPRGDn6YMFz4oqeVQs3CwJCy2NWr7It 1Lq1XSzWatt4z3ebVm4F41njNh246SXoRfV02vHe2Fk26flyDGaHo7+UG34XG6BXnxOwiFT/j3at1 RDpGzhgZR3sUDybUzGHEuvXqqynGWQNMdomfV/QN4Ke+0/tL+WQw8er9c0TaeEpWBkVSIR+nwbmEE 7dr4smxiLGodQg==; Original-Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU34T-00033F-3z; Mon, 20 Feb 2023 05:06:57 -0500 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Duodi 2 =?utf-8?Q?Vent=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Cornouiller 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 In-Reply-To: <42481ef3-1590-1aaa-aaf3-6405918dcbd5@telenet.be> (Maxime Devos's message of "Tue, 7 Feb 2023 13:29:47 +0100") 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-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21717 Archived-At: Hi Maxime, Maxime Devos skribis: >> [RFC,PATCH] Do not GC_INIT the Boehm GC if already initialized > On 06-02-2023 19:34, Jose E. Marchesi wrote: >> Hello Guile hackers. >> We are in the process of integrating GNU poke[1] in GDB by mean of >> libpoke. >> Problem is, libpoke uses the Boehm GC, as guile does. We are >> working on >> switching to an ad-hoc exact collector, but it will get some time. >> So, in the interim, we may: >> 1) Make both libguile and libpoke to do GC_INIT conditionally, only >> if >> no one else has initialized the collector before. This is already in >> poke master. A suggested (untested!) patch for guile below. > [...] > > According to the Boehm GC documentation, this 'conditional > initialisation' is unnecessary: > > /* Portable clients should call this at the program start-up. More */ > /* over, some platforms require this call to be done strictly from the*/ > /* primordial thread. **Multiple invocations are harmless.** */ > #define GC_INIT() [...] > > (emphasis added). The =E2=80=9CMultiple invocations=E2=80=9D bit isn=E2=80=99t in libgc 8.0.4= . Which version are you looking at? Thanks, Ludo=E2=80=99.