Revert explicit Lua GC pass (#241)

This commit is contained in:
Justine Tunney 2021-08-13 03:06:23 -07:00
parent 1aa0df696c
commit 71273bc5c9

View file

@ -545,9 +545,6 @@ static void CollectGarbage(void) {
LOGIFNEG1(munmap(unmaplist.p[unmaplist.n].p, unmaplist.p[unmaplist.n].n));
LOGIFNEG1(close(unmaplist.p[unmaplist.n].f));
}
#ifndef STATIC
(void)lua_gc(L, LUA_GCCOLLECT);
#endif
}
static void UseOutput(void) {
@ -3136,7 +3133,8 @@ static char *ServeStatusz(void) {
AppendLong1("workers", shared->workers);
AppendLong1("assets.n", assets.n);
#ifndef STATIC
AppendLong1("lua.memory", lua_gc(L, LUA_GCCOUNT)*1024 + lua_gc(L, LUA_GCCOUNTB));
AppendLong1("lua.memory",
lua_gc(L, LUA_GCCOUNT) * 1024 + lua_gc(L, LUA_GCCOUNTB));
#endif
ServeCounters();
AppendRusage("server", &shared->server);