summaryrefslogtreecommitdiff
path: root/libguile/fluids.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-11-28 11:32:08 +0100
committerAndy Wingo <wingo@pobox.com>2013-11-28 11:32:08 +0100
commit064d24093b752999979b4a71d19f60489c5dfc6a (patch)
treea8e3f7b76dbe3816c29e433f2a03cec26d48111e /libguile/fluids.c
parenta0a4d859c4101e41d669a62142a6ce1fb55d3a64 (diff)
downloadguile-064d24093b752999979b4a71d19f60489c5dfc6a.tar.gz
Tune initial heap size
* libguile/fluids.c (new_fluid): Don't run an explicit GC for the first fluid. * libguile/gc.c (DEFAULT_INITIAL_HEAP_SIZE, scm_storage_prehistory): Enlarge from 32 kB to 512 or 1024 kB, depending on word size. Reduces startup time by 10 or 15% by avoiding excessive GC. * libguile/private-gc.h: Remove SCM_DEFAULT_INIT_HEAP_SIZE_2 definition here.
Diffstat (limited to 'libguile/fluids.c')
-rw-r--r--libguile/fluids.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/fluids.c b/libguile/fluids.c
index 22d825beb..4e0684af8 100644
--- a/libguile/fluids.c
+++ b/libguile/fluids.c
@@ -116,7 +116,7 @@ new_fluid (SCM init)
if (allocated_fluids[n] == NULL)
break;
- if (trial == 0 && n >= allocated_fluids_len)
+ if (trial == 0 && n >= allocated_fluids_len && allocated_fluids_len)
/* All fluid numbers are in use. Run a GC and retry. Explicitly
running the GC is costly and bad-style. We only do this because
dynamic state fluid vectors would grow unreasonably if fluid numbers