Unity导出的小游戏,很小的一个游戏demo,在其他小游戏平台上可以正常运行,且初始内存256M就足够了。
在微信平台,wasm中一直回调enlargeMemory来申请更多内存,直至遇到2G的上限,随后调用以下方法终止游戏,其中TOTAL_MEMORY等于2122055680:
function abortOnCannotGrowMemory() {
abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value " + TOTAL_MEMORY + ", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ");
}
同遇到。请问解决了吗?
没有人遇到过么