1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Tweak to initial heap size selection

* libguile/gc.c (DEFAULT_INITIAL_HEAP_SIZE): Bump a bit farther (2 MB on
  64-bit, 1 MB on 32-bit) as we now expand to this size instead of
  expanding by this amount.
  (scm_storage_prehistory): Expand to the initial heap size instead of
  expanding by the size.
This commit is contained in:
Andy Wingo 2020-08-27 14:18:44 +02:00
parent fdea77d01c
commit 837580587b

View file

@ -68,7 +68,7 @@
result of 'guile -c "(display (assq-ref (gc-stats)
'heap-total-allocated))"'. */
#define DEFAULT_INITIAL_HEAP_SIZE (200 * 1024 * SIZEOF_UINTPTR_T)
#define DEFAULT_INITIAL_HEAP_SIZE (256 * 1024 * SIZEOF_UINTPTR_T)
/* Set this to != 0 if every cell that is accessed shall be checked:
*/
@ -464,7 +464,9 @@ scm_storage_prehistory ()
GC_INIT ();
GC_expand_hp (DEFAULT_INITIAL_HEAP_SIZE);
size_t heap_size = GC_get_heap_size ();
if (heap_size < DEFAULT_INITIAL_HEAP_SIZE)
GC_expand_hp (DEFAULT_INITIAL_HEAP_SIZE - heap_size);
/* We only need to register a displacement for those types for which the
higher bits of the type tag are used to store a pointer (that is, a