[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: |
Maxime Devos |
Subject: |
Re: [RFC,PATCH] Do not GC_INIT the Boehm GC if already initialized |
Date: |
Tue, 7 Feb 2023 13:29:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 |
> [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).
Greetings,
Maxime
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature