Removed GC checks from function calls

Function calls do not create new objects. (It may use memory with
stack reallocation, but now that is irrelevant to the GC.)
This commit is contained in:
Roberto Ierusalimschy
2022-11-24 10:20:15 -03:00
parent ec61be9a7e
commit 152b51955a
5 changed files with 10 additions and 20 deletions

3
lgc.c
View File

@@ -1700,8 +1700,9 @@ static void fullinc (lua_State *L, global_State *g) {
/* finish any pending sweep phase to start a new cycle */
luaC_runtilstate(L, bitmask(GCSpause));
luaC_runtilstate(L, bitmask(GCScallfin)); /* run up to finalizers */
luaC_runtilstate(L, bitmask(GCSpause)); /* finish collection */
/* estimate must be correct after a full GC cycle */
lua_assert(g->marked == gettotalobjs(g));
luaC_runtilstate(L, bitmask(GCSpause)); /* finish collection */
setpause(g);
}