klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 8675a8253a3cda82922d9481f321b4df98fb3dae
parent cee0922e378d421c6cbb07eac10ab5e16b25dd0d
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Wed, 20 Apr 2011 12:44:52 -0300

Enabled gc now that Valgrinds say there are no problems (when running tests with gcpause at 125).

Diffstat:
Msrc/klispconf.h | 7++-----
Msrc/kstate.c | 3+--
2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/klispconf.h b/src/klispconf.h @@ -13,12 +13,10 @@ #include <stdint.h> #include <stdbool.h> -/* XXX: disable the gc till the bug is removed - (throws a weird error after running (load "tests/test-all.k") twice */ /* temp defines till gc is stabilized */ #define KUSE_GC 1 /* Print msgs when starting and ending gc */ -#define KDEBUG_GC 1 +/*#define KDEBUG_GC 1 */ /* #define KTRACK_MARKS (true) @@ -39,8 +37,7 @@ /* In lua that has incremental gc this is setted to 200, in klisp as we don't yet have incremental gc, we set it to 400 */ -//#define KLISPI_GCPAUSE 400 /* 400% (wait memory to quadruple before next GC) */ -#define KLISPI_GCPAUSE 125 +#define KLISPI_GCPAUSE 400 /* 400% (wait memory to quadruple before next GC) */ /* diff --git a/src/kstate.c b/src/kstate.c @@ -187,8 +187,7 @@ klisp_State *klisp_newstate (klisp_Alloc f, void *ud) { kinit_ground_env(K); /* set the threshold for gc start now that we have allocated all mem */ -// K->GCthreshold = 4*K->totalbytes; - K->GCthreshold = K->totalbytes + K->totalbytes / 4; + K->GCthreshold = 4*K->totalbytes; return K; }