内存不够lua: not enough memory
(2015-06-11 15:01:25)
标签:
luanotenoughmemory |
今天搞Excel字符读取工作,不小心弹出这个错误,我屏蔽掉刚开发过代码,发现是string.gsub有问题,在细看,参数我传递了一个str进来,而这个str有几十K大!于是错误定位成这个位置了。
str = str ..
"hello"
local str =""
for i = 1, 100000000, 1 do
end
local s = string.gsub(str, "hello", "hi")
然后就会出现:lua: not enough memory

加载中…