Increase memory limit before GC kicks in (2x last active and >= 16MB).
This commit is contained in:
parent
8c683a2451
commit
3bd580d398
6
gc.c
6
gc.c
|
|
@ -186,10 +186,10 @@ static value_t allocate_object(int tag)
|
||||||
assert((0 <= tag) && (tag <= 15));
|
assert((0 <= tag) && (tag <= 15));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Run GC when total memory used is 75% more than either total
|
** Run GC when total memory used is either twice the total
|
||||||
** live after last GC pass, or 4MB, whichever is greater.
|
** 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)
|
if (gc_enabled)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue