[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] branch master updated: Tweak to initial heap size select
From: |
Andy Wingo |
Subject: |
[Guile-commits] branch master updated: Tweak to initial heap size selection |
Date: |
Thu, 27 Aug 2020 08:41:46 -0400 |
This is an automated email from the git hooks/post-receive script.
wingo pushed a commit to branch master
in repository guile.
The following commit(s) were added to refs/heads/master by this push:
new 8375805 Tweak to initial heap size selection
8375805 is described below
commit 837580587ba8dfab22ad74e3b4c062df00ca7422
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Thu Aug 27 14:18:44 2020 +0200
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.
---
libguile/gc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libguile/gc.c b/libguile/gc.c
index 0fcce32..7717e9b 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] branch master updated: Tweak to initial heap size selection,
Andy Wingo <=