From 3bd580d39826e3f35a978bf933a83a65c3d43438 Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Sat, 14 Jul 2012 14:53:08 -0500 Subject: [PATCH] Increase memory limit before GC kicks in (2x last active and >= 16MB). --- gc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gc.c b/gc.c index e2119d0..80a5b41 100644 --- a/gc.c +++ b/gc.c @@ -186,10 +186,10 @@ static value_t allocate_object(int tag) assert((0 <= tag) && (tag <= 15)); /* - ** Run GC when total memory used is 75% more than either total - ** live after last GC pass, or 4MB, whichever is greater. + ** Run GC when total memory used is either twice the total + ** live after last GC pass, or 16MB, whichever is greater. */ - if ((4 * gc_total_bytes) >= (7 * GC_MAX(gc_live_bytes, 4 * 1024 * 1024))) + if (gc_total_bytes >= GC_MAX(2 * gc_live_bytes, 16 * 1024 * 1024)) { if (gc_enabled) {