mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +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:
parent
fdea77d01c
commit
837580587b
1 changed files with 4 additions and 2 deletions
|
@ -68,7 +68,7 @@
|
||||||
result of 'guile -c "(display (assq-ref (gc-stats)
|
result of 'guile -c "(display (assq-ref (gc-stats)
|
||||||
'heap-total-allocated))"'. */
|
'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:
|
/* Set this to != 0 if every cell that is accessed shall be checked:
|
||||||
*/
|
*/
|
||||||
|
@ -464,7 +464,9 @@ scm_storage_prehistory ()
|
||||||
|
|
||||||
GC_INIT ();
|
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
|
/* 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
|
higher bits of the type tag are used to store a pointer (that is, a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue