bug-guile
[Top][All Lists]
Advanced

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

Re: Guile 2.0.1: scm_init_guile() broken on Mac OS X 10.6.7


From: Andy Wingo
Subject: Re: Guile 2.0.1: scm_init_guile() broken on Mac OS X 10.6.7
Date: Fri, 20 May 2011 15:58:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello,

On Fri 20 May 2011 15:39, Hans Aberg <address@hidden> writes:

> There is a comment in in libguile/gc.c suggesting it isn't called, there is:
>
> void
> scm_storage_prehistory ()
> {
>   GC_all_interior_pointers = 0;
>   GC_set_free_space_divisor (scm_getenv_int ("GC_FREE_SPACE_DIVISOR", 3));
>
>   GC_INIT ();
>
> #if (! ((defined GC_VERSION_MAJOR) && (GC_VERSION_MAJOR >= 7))) \
>     && (defined SCM_I_GSC_USE_PTHREAD_THREADS)
>   /* When using GC 6.8, this call is required to initialize thread-local
>      freelists (shouldn't be necessary with GC 7.0).  */
>   GC_init ();
> #endif
> ...
> }
>
> The presumption is wrong, because it does not work on Mac OS X without 
> calling GC_init() - I have tried.

Did you enable threads? `grep PTHREAD scmconfig.h` to check.

Here is the current definition of GC_INIT ():

    /* 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.                                                   */
    #define GC_INIT() { GC_INIT_CONF_DONT_EXPAND; /* pre-init */ \
                        GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT; \
                        GC_INIT_CONF_MAX_RETRIES; \
                        GC_INIT_CONF_FREE_SPACE_DIVISOR; \
                        GC_INIT_CONF_FULL_FREQ; \
                        GC_INIT_CONF_TIME_LIMIT; \
                        GC_INIT_CONF_MAXIMUM_HEAP_SIZE; \
                        GC_init(); /* real GC initialization */ \
                        GC_INIT_CONF_ROOTS; /* post-init */ \
                        GC_INIT_CONF_IGNORE_WARN; \
                        GC_INIT_CONF_INITIAL_HEAP_SIZE; }

So you see it does GC_init().  That was not always the case in previous
versions, AFAIK.

Andy
-- 
http://wingolog.org/



reply via email to

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