GC back to controling pace counting bytes

Memory is the resource we want to save. Still to be reviewed again.
This commit is contained in:
Roberto Ierusalimschy
2024-09-19 19:02:14 -03:00
parent b443145ff3
commit ddfa1fbccf
11 changed files with 247 additions and 202 deletions

View File

@@ -618,6 +618,7 @@ LUALIB_API void luaL_pushresult (luaL_Buffer *B) {
box->bsize = 0; box->box = NULL;
lua_pushextlstring(L, s, len, allocf, ud);
lua_closeslot(L, -2); /* close the box */
lua_gc(L, LUA_GCSTEP, len);
}
lua_remove(L, -2); /* remove box or placeholder from the stack */
}