aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-12-22 14:48:07 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-12-22 14:48:07 -0300
commite2cc179454c6aa6cde5f98954bd3783e0d5d53a3 (patch)
tree1770fb2eded15ad53211693b19eb2a8698cbf192 /ltests.c
parentad0ea7813b39e76b377983138ca995189e22054f (diff)
downloadlua-e2cc179454c6aa6cde5f98954bd3783e0d5d53a3.tar.gz
lua-e2cc179454c6aa6cde5f98954bd3783e0d5d53a3.tar.bz2
lua-e2cc179454c6aa6cde5f98954bd3783e0d5d53a3.zip
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.
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ltests.c b/ltests.c
index 93af528e..cf9a8eaf 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1037,12 +1037,12 @@ static int query_GCparams (lua_State *L) {
1037 global_State *g = G(L); 1037 global_State *g = G(L);
1038 lua_pushinteger(L, gettotalobjs(g)); 1038 lua_pushinteger(L, gettotalobjs(g));
1039 lua_pushinteger(L, g->GCdebt); 1039 lua_pushinteger(L, g->GCdebt);
1040 lua_pushinteger(L, luaO_applyparam(g->gcpgenminormul, 100)); 1040 lua_pushinteger(L, applygcparam(g, MINORMUL, 100));
1041 lua_pushinteger(L, luaO_applyparam(g->gcpmajorminor, 100)); 1041 lua_pushinteger(L, applygcparam(g, MAJORMINOR, 100));
1042 lua_pushinteger(L, luaO_applyparam(g->gcpminormajor, 100)); 1042 lua_pushinteger(L, applygcparam(g, MINORMAJOR, 100));
1043 lua_pushinteger(L, luaO_applyparam(g->gcppause, 100)); 1043 lua_pushinteger(L, applygcparam(g, PAUSE, 100));
1044 lua_pushinteger(L, luaO_applyparam(g->gcpstepmul, 100)); 1044 lua_pushinteger(L, applygcparam(g, STEPMUL, 100));
1045 lua_pushinteger(L, luaO_applyparam(g->gcpstepsize, 100)); 1045 lua_pushinteger(L, applygcparam(g, STEPSIZE, 100));
1046 return 8; 1046 return 8;
1047} 1047}
1048 1048