MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaE_shrinkCI

Function luaE_shrinkCI

src/Chain/libraries/glua/lstate.cpp:140–151  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

luaD_shrinkstackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected