Weird Out of Memory error. How could this happen?

java.lang.OutOfMemoryError: Failed to allocate a 1022304 byte allocation with 16777216 free bytes and 464MB until OOM
 1  at  java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:95)
 2  at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:146)
 3  at java.lang.StringBuilder.append(StringBuilder.java:216)

      

I am running a bug in Android 5.0 where our app crashes for many users. However, the out of memory exception is very strange and only happens on Android 5.0+. The same app works fine in all versions below 5.0.

How can it happen that OOM

occurs when allocating 1 MB from 16 MB of free bytes and 464 MB to OOM

???

+3


source to share





All Articles