Low level android out of memory crashes using Real

2019-09-19 00:09发布

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.

0条回答
登录 后发表回答