Increase memory limit before GC kicks in (2x last active and >= 16MB).

This commit is contained in:
Jesse D. McDonald 2012-07-14 14:53:08 -05:00
parent 8c683a2451
commit 3bd580d398
1 changed files with 3 additions and 3 deletions

6
gc.c
View File

@ -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)
{