guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Killing off scm_init_guile for Guile 2.0 ?


From: Clinton Ebadi
Subject: Re: Killing off scm_init_guile for Guile 2.0 ?
Date: Fri, 23 Jan 2009 01:13:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Neil Jerram <address@hidden> writes:

>> The problem is,
>> of course, that if you scm_init_guile in some .so,
>> you will accidentally place the entire system into guile
>> mode, and not just the .so, as intended.
>
> Or, to put that another way, the "guile mode"-ness persists on the
> thread that called your libguile-using code, even after the thread has
> returned back into the depths of the application.  That might not be a
> problem, but it could be.  For example, threads in guile mode are
> (currently; I'm not sure what BDW-GC will do) paused when a garbage
> collection is needed; so activity on another guile thread could
> suddenly block the application thread; or more likely the other way
> round: the GC would not be able to proceed, because the application
> thread would not actually pause.

Does Guile mode actually have any meaning when using the BDW GC? The BDW
GC algorithm does not need to put other threads to sleep when sweeping;
it does this implicitly by causing the functions that register
collectable memory to block during the sweep phase as far as I can
tell. The libc malloc/free can continue doing whatever they want in the
meantime. A thread blocking for any reason should not be a problem as a
result (does Guile mode have another other restrictions?).

http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcdescr.html has a good
overview of the BDW GC algorithm, and a few links to related papers
describing the algorithms used in more detail.

-- 
                   It's no contest, but we still race there                   
                Like the saintly tortoise and the godless hare                




reply via email to

[Prev in Thread] Current Thread [Next in Thread]