xLua icon indicating copy to clipboard operation
xLua copied to clipboard

在require大量加载lua文件时,经常报出not enough memory

Open EdmundRF opened this issue 5 years ago • 1 comments

非必现,而且是随机错误,并非加载到某个文件时固定报错。 原先项目使用Unity2017.4.14,很长一段时间内运行正常,之后开始有一定概率出现。 最近项目升到Unity2018.4版本,此报错出现概率大大提高,几乎必现。 通过collectgarbage(count)打印出来的,顺利加载完后大概在40000+左右。

xlua版本已更新到当前最新,使用的是luajit,尝试过使用luajit_GC64,没有改善。 报错内容: LuaException: error loading module xxx from CustomLoader, not enough memory

EdmundRF avatar Mar 08 '21 11:03 EdmundRF

GC64都解决不了的话,只能建议别用luajit了

chexiongsheng avatar Mar 08 '21 13:03 chexiongsheng