~ chicken-core (chicken-5) 0879e31f6181bfe87484ffbbec90b38bf9f728cd
commit 0879e31f6181bfe87484ffbbec90b38bf9f728cd
Author: dieggsy <dieggsy@pm.me>
AuthorDate: Sat Apr 10 13:36:18 2021 -0400
Commit: Mario Domenech Goulart <mario@parenteses.org>
CommitDate: Thu May 20 21:26:07 2021 +0200
Increase maximum heap size on 64-bit machines
Signed-off-by: Peter Bex <peter@more-magic.net>
Signed-off-by: Mario Domenech Goulart <mario@parenteses.org>
diff --git a/NEWS b/NEWS
index 7f9faecd..7c20c0a0 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,9 @@
contributed by Sebastien Marie)
- A feature corresponding to the word size is available
regardless of the word size (#1693)
+ - The default maximum heap size on 64-bit platforms is now the
+ theoretical maximum addressable memory size (#1675). Use -:m
+ if you would like to override this at run-time.
- Deprecated C_(a_i_current_)milliseconds in favor of
C_(a_i_)current_process_milliseconds to match the Scheme-level
deprecation of current-milliseconds.
diff --git a/runtime.c b/runtime.c
index 51cfa7be..dfc2e0ee 100644
--- a/runtime.c
+++ b/runtime.c
@@ -150,8 +150,10 @@ static C_TLS int timezone;
#ifdef C_SIXTY_FOUR
# define DEFAULT_STACK_SIZE (1024 * 1024)
+# define DEFAULT_MAXIMAL_HEAP_SIZE 0x7ffffffffffffff0
#else
# define DEFAULT_STACK_SIZE (256 * 1024)
+# define DEFAULT_MAXIMAL_HEAP_SIZE 0x7ffffff0
#endif
#define DEFAULT_SYMBOL_TABLE_SIZE 2999
@@ -159,7 +161,6 @@ static C_TLS int timezone;
#define DEFAULT_HEAP_SIZE DEFAULT_STACK_SIZE
#define MINIMAL_HEAP_SIZE DEFAULT_STACK_SIZE
#define DEFAULT_SCRATCH_SPACE_SIZE 256
-#define DEFAULT_MAXIMAL_HEAP_SIZE 0x7ffffff0
#define DEFAULT_HEAP_GROWTH 200
#define DEFAULT_HEAP_SHRINKAGE 50
#define DEFAULT_HEAP_SHRINKAGE_USED 25
Trap