Android: OutofMemoryError: bitmap size exceeds VM budget with no reason I can see

前端 未结 5 1897
生来不讨喜
生来不讨喜 2020-11-30 07:43

I am having an OutOfMemory exception with a gallery over 600x800 pixels JPEG\'s.


The environment

I\'ve been using Gallery with JPG ima

5条回答
  •  时光说笑
    2020-11-30 07:44

    The question was asked in 2010, when Froyo was fresh. So many things happened since. Before 3.0, bitmaps were allocated in JNI. The memory didn't show in the Dalvik stats. It doesn't have to be monolithic anymore. Before 2.3, memory statistics for JNI were not available (bitmap decoding calls JNI) in logcat. 4.4 evacuated more space. 5.0 the big bang of Art. Back in 2010, Nexus One was high end, with less than 300MB. The budget for an app was around 16MB. Now days, there is about 8 times that memory.

提交回复
热议问题