mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-05 17:30:27 +00:00
Add Lua gc call to keep Lua memory usage constant
This commit is contained in:
parent
be0f03a23e
commit
b7861d6a31
1 changed files with 3 additions and 0 deletions
|
@ -545,6 +545,9 @@ 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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue