core: Use 0.25% safety region.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 2 Apr 2017 10:58:18 +0000 (12:58 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 2 Apr 2017 10:58:18 +0000 (12:58 +0200)
* gc.c (gc_up_arena): Up GC_SAFETY too.
* scripts/repl.mes: Remove MES_ARENA override.

gc.c
mes.c
scripts/repl.mes

diff --git a/gc.c b/gc.c
index 7413184a648d708d0e1388a863f86028c322acdc..0c9c1608ae1142efec201cb7f1e351eb64aa1574 100644 (file)
--- a/gc.c
+++ b/gc.c
@@ -23,9 +23,11 @@ gc_up_arena () ///((internal))
 {
 #if _POSIX_SOURCE
   ARENA_SIZE *= 2;
 {
 #if _POSIX_SOURCE
   ARENA_SIZE *= 2;
+  GC_SAFETY *= 2;
   void *p = realloc (g_cells-1, 2*ARENA_SIZE*sizeof(struct scm));
 #else
   ARENA_SIZE = ARENA_SIZE * 2;
   void *p = realloc (g_cells-1, 2*ARENA_SIZE*sizeof(struct scm));
 #else
   ARENA_SIZE = ARENA_SIZE * 2;
+  GC_SAFETY = GC_SAFETY * 2;
   //p = realloc (g_cells-1, 2*ARENA_SIZE*sizeof(struct scm));
   int size = ARENA_SIZE * 2;
   size = size * 12;
   //p = realloc (g_cells-1, 2*ARENA_SIZE*sizeof(struct scm));
   int size = ARENA_SIZE * 2;
   size = size * 12;
diff --git a/mes.c b/mes.c
index f8ff044668b95be22c68bb4fa86c128b2bd332b9..8fc90cf0c353879d6dc40fd72650e31b24a287c3 100644 (file)
--- a/mes.c
+++ b/mes.c
@@ -43,7 +43,9 @@ typedef int bool;
 
 int ARENA_SIZE = 100000;
 int MAX_ARENA_SIZE = 20000000;
 
 int ARENA_SIZE = 100000;
 int MAX_ARENA_SIZE = 20000000;
-int GC_SAFETY = 20000;
+//int GC_SAFETY_DIV = 400;
+//int GC_SAFETY = ARENA_SIZE / 400;
+int GC_SAFETY = 250;
 
 typedef int SCM;
 enum type_t {TCHAR, TCLOSURE, TCONTINUATION, TFUNCTION, TKEYWORD, TMACRO, TNUMBER, TPAIR, TREF, TSPECIAL, TSTRING, TSYMBOL, TVALUES, TVECTOR, TBROKEN_HEART};
 
 typedef int SCM;
 enum type_t {TCHAR, TCLOSURE, TCONTINUATION, TFUNCTION, TKEYWORD, TMACRO, TNUMBER, TPAIR, TREF, TSPECIAL, TSTRING, TSYMBOL, TVALUES, TVECTOR, TBROKEN_HEART};
index 4c4b07a09ef5513044cf0893467a55bd3a3a5835..3296f09f0896cf9459a7463ead0560d439e48f1b 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # -*-scheme-*-
 MES=${MES-$(dirname $0)/mes}
 #! /bin/sh
 # -*-scheme-*-
 MES=${MES-$(dirname $0)/mes}
-MES_ARENA=${MES_ARENA-30000000}
-export MES_ARENA
+#MES_ARENA=${MES_ARENA-30000000}
+#export MES_ARENA
 prefix=module/
 cat $prefix/mes/base-0.mes $0 /dev/stdin | $MES $MES_FLAGS "$@"
 #paredit:|
 prefix=module/
 cat $prefix/mes/base-0.mes $0 /dev/stdin | $MES $MES_FLAGS "$@"
 #paredit:|