[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC,PATCH] Do not GC_INIT the Boehm GC if already initialized
From: |
Ludovic Courtès |
Subject: |
Re: [RFC,PATCH] Do not GC_INIT the Boehm GC if already initialized |
Date: |
Mon, 20 Feb 2023 11:06:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi Maxime,
Maxime Devos <maximedevos@telenet.be> 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 “Multiple invocations” bit isn’t in libgc 8.0.4. Which version are
you looking at?
Thanks,
Ludo’.