Revamp of GC parameters

More uniformity when handling GC parameters + avoid divisions by 100
when applying them.
This commit is contained in:
Roberto Ierusalimschy
2022-12-13 11:55:14 -03:00
parent ff106c028c
commit 40565b4a08
6 changed files with 61 additions and 41 deletions

View File

@@ -1031,8 +1031,8 @@ static int query_inc (lua_State *L) {
global_State *g = G(L);
lua_pushinteger(L, gettotalobjs(g));
lua_pushinteger(L, g->GCdebt);
lua_pushinteger(L, getgcparam(g->gcpause));
lua_pushinteger(L, getgcparam(g->gcstepmul));
lua_pushinteger(L, applygcparam(g, gcpause, 100));
lua_pushinteger(L, applygcparam(g, gcstepmul, 100));
lua_pushinteger(L, cast(l_obj, 1) << g->gcstepsize);
return 5;
}