MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaC_freeallobjects

Function luaC_freeallobjects

freebsd/contrib/openzfs/module/lua/lgc.c:982–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980
981
982void luaC_freeallobjects (lua_State *L) {
983 global_State *g = G(L);
984 int i;
985 separatetobefnz(L, 1); /* separate all objects with finalizers */
986 lua_assert(g->finobj == NULL);
987 callallpendingfinalizers(L, 0);
988 g->currentwhite = WHITEBITS; /* this "white" makes all objects look dead */
989 g->gckind = KGC_NORMAL;
990 sweepwholelist(L, &g->finobj); /* finalizers can create objs. in 'finobj' */
991 sweepwholelist(L, &g->allgc);
992 for (i = 0; i < g->strt.size; i++) /* free all string lists */
993 sweepwholelist(L, &g->strt.hash[i]);
994 lua_assert(g->strt.nuse == 0);
995}
996
997
998static l_mem atomic (lua_State *L) {

Callers 1

close_stateFunction · 0.85

Calls 2

separatetobefnzFunction · 0.85
callallpendingfinalizersFunction · 0.85

Tested by

no test coverage detected