From 1d8920dd7f508af5f2fd743678be1327f30c079b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 11 Oct 2017 09:38:45 -0300 Subject: some cleaning in GC parameters --- lgc.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index 36f361ec..5113e922 100644 --- a/lgc.h +++ b/lgc.h @@ -1,5 +1,5 @@ /* -** $Id: lgc.h,v 2.97 2017/05/04 13:32:01 roberto Exp roberto $ +** $Id: lgc.h,v 2.98 2017/05/26 19:14:29 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -119,10 +119,20 @@ /* Default Values for GC parameters */ #define LUAI_GENMAJORMUL 100 -#define LUAI_GENMINORMUL 5 +#define LUAI_GENMINORMUL 12 + +/* wait memory to double before starting new cycle */ +#define LUAI_GCPAUSE 200 /* 200% */ + +/* +** gc parameters are stored divided by 4 to allow a maximum value larger +** than 1000 in an 'lu_byte'. +*/ +#define getgcparam(p) ((p) * 4) +#define setgcparam(p,v) ((p) = (v) / 4) + +#define LUAI_GCMUL 100 -#define LUAI_GCPAUSE 100 /* 100% */ -#define LUAI_GCMUL 10 /* how much to allocate before next GC step (log2) */ #define LUAI_GCSTEPSIZE 13 /* 8 KB */ -- cgit v1.2.3-55-g6feb