Low level android out of memory crashes using Realm

╄→尐↘猪︶ㄣ 提交于 2019-12-11 04:36:46

问题


I've been getting many OOM crashes in my android app (many but not all of them seem to be in Realm code:

First:

io.realm.exceptions.RealmError: Unrecoverable error. mmap() failed: Out of memory size: 872415232 offset: 0 in /Users/zaki/fromgit/realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 92

Second:

io.realm.exceptions.RealmError: Unrecoverable error. Too many open files in /Users/zaki/fromgit/realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 92

but also some even more vague memory issues:

java.lang.OutOfMemoryError: Could not allocate JNI Env

These issues seem to only happen in production and watching the memory usage in my app seems to hover pretty consistently around 10MB.

来源:https://stackoverflow.com/questions/41154207/low-level-android-out-of-memory-crashes-using-realm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!