1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

Avoid needless GC on startup due to scm_gc_register_allocation

* libguile/gc.c (bytes_until_gc): Initialize to
  DEFAULT_INITIAL_HEAP_SIZE, to avoid forced GC on the first
  mallocation.
This commit is contained in:
Andy Wingo 2013-11-28 12:10:50 +01:00
parent 87fc4596e5
commit 553294d958

View file

@ -743,7 +743,7 @@ get_image_size (void)
}
/* These are discussed later. */
static size_t bytes_until_gc;
static size_t bytes_until_gc = DEFAULT_INITIAL_HEAP_SIZE;
static scm_i_pthread_mutex_t bytes_until_gc_lock = SCM_I_PTHREAD_MUTEX_INITIALIZER;
/* Make GC run more frequently when the process image size is growing,