49
edits
m (Move page script moved page Lua object memory sizes to WoW:Lua object memory sizes without leaving a redirect) |
|||
| Line 54: | Line 54: | ||
Each function closure takes 20 bytes of RAM. The below code will use 20000 bytes: | Each function closure takes 20 bytes of RAM. The below code will use 20000 bytes: | ||
<pre> | |||
for t=1,1000 | for t=1,1000 | ||
x = function() end | x = function() end | ||
end | end | ||
</pre> | |||
Upvalues that do not change only uses 4 bytes per closure. The below code will use 20000 + 4000 = 24000 bytes: | Upvalues that do not change only uses 4 bytes per closure. The below code will use 20000 + 4000 = 24000 bytes: | ||
local semistatic = "hi!" | local semistatic = "hi!" | ||