MCPcopy Create free account
hub / github.com/AshenvaleZX/ZXEngine / luaD_shrinkstack

Function luaD_shrinkstack

CPPScripts/External/Lua/ldo.c:274–290  ·  view source on GitHub ↗

** If stack size is more than 3 times the current use, reduce that size ** to twice the current use. (So, the final stack size is at most 2/3 the ** previous size, and half of its entries are empty.) ** As a particular case, if stack was handling a stack overflow and now ** it is not, 'max' (limited by LUAI_MAXSTACK) will be smaller than ** stacksize (equal to ERRORSTACKSIZE in this case), and so

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

finishpcallkFunction · 0.85
luaD_pcallFunction · 0.85
traversethreadFunction · 0.85

Calls 3

stackinuseFunction · 0.85
luaD_reallocstackFunction · 0.85
luaE_shrinkCIFunction · 0.85

Tested by

no test coverage detected