From e2cc179454c6aa6cde5f98954bd3783e0d5d53a3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 22 Dec 2023 14:48:07 -0300 Subject: New option "setparms" for 'collectgarbage' The generational mode also uses the parameters for the incremental mode in its major collections, so it should be easy to change those parameters without having to change the GC mode. --- lgc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index 6a03f787..9aff11f5 100644 --- a/lgc.h +++ b/lgc.h @@ -193,7 +193,8 @@ #define LUAI_GCSTEPSIZE 250 -#define setgcparam(g,p,v) if ((v) >= 0) {g->p = luaO_codeparam(v);} +#define setgcparam(g,p,v) (g->gcparams[LUA_GCP##p] = luaO_codeparam(v)) +#define applygcparam(g,p,x) luaO_applyparam(g->gcparams[LUA_GCP##p], x) /* ** Control when GC is running: -- cgit v1.2.3-55-g6feb