From 71273bc5c9d2b8221278df4727a7e9bb21c31d05 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Fri, 13 Aug 2021 03:06:23 -0700 Subject: [PATCH] Revert explicit Lua GC pass (#241) --- tool/net/redbean.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tool/net/redbean.c b/tool/net/redbean.c index 237a636ba..ae32f263a 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -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);