MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaE_shrinkCI

Function luaE_shrinkCI

third-party/lua-5.3.5/src/lstate.c:137–148  ·  view source on GitHub ↗

** free half of the CallInfo structures not in use by a thread */

Source from the content-addressed store, hash-verified

135** free half of the CallInfo structures not in use by a thread
136*/
137void luaE_shrinkCI (lua_State *L) {
138 CallInfo *ci = L->ci;
139 CallInfo *next2; /* next's next */
140 /* while there are two nexts */
141 while (ci->next != NULL && (next2 = ci->next->next) != NULL) {
142 luaM_free(L, ci->next); /* free next */
143 L->nci--;
144 ci->next = next2; /* remove 'next' from the list */
145 next2->previous = ci;
146 ci = next2; /* keep next's next */
147 }
148}
149
150
151static void stack_init (lua_State *L1, lua_State *L) {

Callers 1

luaD_shrinkstackFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected