Hello, On Fri 20 May 2011 15:39, Hans Aberg <haber...@telia.com> 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/