This might be sort of a strange question, but curiosity got the best of me when I ended up getting a memory error after filling up a table with 14 million+ items.
Is there a sort-of set memory limit for Lua tables, or is it somewhat dynamic at all? I figured Lua itself would allocate so much memory in general, and the error would be thrown when that ran out, but that's just a wild guess. Anyone know for sure? Thanks.
t={}
for i=1,176000000 do t[#t+1]=i end
Tried out with a lua windows 64 bit binary - works fine.
A 64 bit luajit binary crashed. Seems like a bug of luajit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With