From 0a614e654339f6eccad602c39f52609f99b59d38 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 11 Dec 2016 18:41:08 +0100 Subject: [PATCH] core: Set max arena size. * mes.c (MAX_ARENA_SIZE): New global. (gc): Use it. --- mes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mes.c b/mes.c index 140d6c17..91705885 100644 --- a/mes.c +++ b/mes.c @@ -34,6 +34,7 @@ #define ENV_CACHE 1 int ARENA_SIZE = 100000; +int MAX_ARENA_SIZE = 20000000; int GC_SAFETY = 100; typedef long SCM; @@ -914,7 +915,7 @@ gc () { if (g_debug) fprintf (stderr, "***gc[%d]...", g_free.value); g_free.value = 1; - if (g_cells < g_news) gc_up_arena (); + if (g_cells < g_news && ARENA_SIZE < MAX_ARENA_SIZE) gc_up_arena (); for (int i=g_free.value; i