summaryrefslogtreecommitdiff
path: root/libguile/gc.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-04-23 18:12:26 +0200
committerLudovic Courtès <ludo@gnu.org>2014-04-23 18:12:26 +0200
commit3f69e638be12cfe9d5963df21e6c004a733f0ca1 (patch)
treee579b3010218a7dd188128158e8e1c2dfd07c68b /libguile/gc.c
parentd38ca16e2cd444418b284dc15fc4be8402004acc (diff)
downloadguile-3f69e638be12cfe9d5963df21e6c004a733f0ca1.tar.gz
Set $GC_MARKERS to 1 when libgc 7.4.0 is used.
* libguile/gc.c (scm_storage_prehistory) [GC_VERSION == 7.4.0]: Add 'setenv' call.
Diffstat (limited to 'libguile/gc.c')
-rw-r--r--libguile/gc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libguile/gc.c b/libguile/gc.c
index eacd5e256..bc35faf33 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -602,6 +602,14 @@ scm_storage_prehistory ()
GC_set_free_space_divisor (free_space_divisor);
GC_set_finalize_on_demand (1);
+#if (GC_VERSION_MAJOR == 7 && GC_VERSION_MINOR == 4 \
+ && GC_ALPHA_VERSION == 0)
+ /* BDW-GC 7.4.0 has a bug making it loop indefinitely when using more
+ than one marker thread: <https://github.com/ivmai/bdwgc/pull/30>.
+ Work around it by asking for one marker thread. */
+ setenv ("GC_MARKERS", "1", 1);
+#endif
+
GC_INIT ();
GC_expand_hp (DEFAULT_INITIAL_HEAP_SIZE);