]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/main.cc
* lily/main.cc (setup_guile_env): new function. Set GC min_yields
[lilypond.git] / lily / main.cc
index 1efd32303b8239b252de73c015080d8c1712b714..162dc08480a74a276c44206080044d55c5be5d9f 100644 (file)
@@ -726,11 +726,29 @@ parse_argv (int argc, char **argv)
     }
 }
 
+void
+setup_guile_env ()
+{
+  char * yield = getenv ("LILYPOND_GC_YIELD");
+  bool overwrite = true;
+  if (!yield)
+    {
+      yield = "70";
+      overwrite = false;
+    }
+  
+  setenv ("GUILE_MIN_YIELD_1", yield, overwrite);
+  setenv ("GUILE_MIN_YIELD_2", yield, overwrite);
+  setenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
+}
+
+
 int
 main (int argc, char **argv)
 {
   setup_localisation ();
   setup_paths (argv[0]);
+  setup_guile_env ();
   parse_argv (argc, argv);
   if (isatty (STDIN_FILENO))
     identify (stderr);