core: Increase MAX_ARENA_SIZE and GC safety.

* mes.c (MAX_ARENA_SIZE): Double to 40000000.
 (GC_SAFETY): Set to 10000 cells (WAS: 1000).
* scaffold/mini-mes.c (MAX_ARENA_SIZE, GC_SAFETY): Likewise.
* gc.c (gc)[MES_DEBUG]: Also print safety area.
This commit is contained in:
Jan Nieuwenhuizen 2017-04-01 19:10:28 +02:00
parent 5cd5681a4d
commit 3f60c2ec95
3 changed files with 10 additions and 8 deletions

10
gc.c
View file

@ -53,11 +53,11 @@ gc_flip () ///((internal))
g_cells = g_news; g_cells = g_news;
g_news = cells; g_news = cells;
#if _POSIX_SOURCE #if _POSIX_SOURCE
if (g_debug) fprintf (stderr, " => jam[%d]\n", g_free); if (g_debug) fprintf (stderr, ";;; => jam[%d]\n", g_free);
#else #else
if (g_debug) if (g_debug)
{ {
eputs (" => jam["); eputs (";;; => jam[");
eputs (itoa (g_free)); eputs (itoa (g_free));
eputs ("]\n"); eputs ("]\n");
} }
@ -164,12 +164,14 @@ SCM
gc () gc ()
{ {
#if _POSIX_SOURCE #if _POSIX_SOURCE
if (g_debug) fprintf (stderr, "***gc[%d]...", g_free); if (g_debug) fprintf (stderr, ";;; gc[%d:%d]...", g_free, ARENA_SIZE - g_free);
#else #else
if (g_debug) if (g_debug)
{ {
eputs ("***gc["); eputs (";;; gc[");
eputs (itoa (g_free)); eputs (itoa (g_free));
eputs (":");
eputs (itoa (ARENA_SIZE - g_free));
eputs ("]..."); eputs ("]...");
} }
#endif #endif

4
mes.c
View file

@ -42,8 +42,8 @@ typedef int bool;
#define FIXED_PRIMITIVES 1 #define FIXED_PRIMITIVES 1
int ARENA_SIZE = 100000; int ARENA_SIZE = 100000;
int MAX_ARENA_SIZE = 20000000; int MAX_ARENA_SIZE = 40000000;
int GC_SAFETY = 1000; int GC_SAFETY = 10000;
typedef int SCM; typedef int SCM;
enum type_t {TCHAR, TCLOSURE, TCONTINUATION, TFUNCTION, TKEYWORD, TMACRO, TNUMBER, TPAIR, TREF, TSPECIAL, TSTRING, TSYMBOL, TVALUES, TVECTOR, TBROKEN_HEART}; enum type_t {TCHAR, TCLOSURE, TCONTINUATION, TFUNCTION, TKEYWORD, TMACRO, TNUMBER, TPAIR, TREF, TSPECIAL, TSTRING, TSYMBOL, TVALUES, TVECTOR, TBROKEN_HEART};

View file

@ -32,8 +32,8 @@ int ARENA_SIZE = 100000;
#else #else
int ARENA_SIZE = 1000000000; int ARENA_SIZE = 1000000000;
#endif #endif
int MAX_ARENA_SIZE = 20000000; int MAX_ARENA_SIZE = 40000000;
int GC_SAFETY = 1000; int GC_SAFETY = 10000;
char *arena = 0; char *arena = 0;