Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
540 views
in Technique[技术] by (71.8m points)

memory management - External allocation too large for this process in Android

I'm getting "external allocation too large for this process" errors in my app. Lots of these at once:

11-16 10:56:59.230: ERROR/dalvikvm-heap(2875): 1303680-byte external allocation too large for this process.
11-16 10:56:59.230: ERROR/GraphicsJNI(2875): VM won't let us allocate 1303680 bytes
11-16 10:56:59.230: ERROR/dalvikvm-heap(2875): 1536000-byte external allocation too large for this process.
11-16 10:56:59.230: ERROR/GraphicsJNI(2875): VM won't let us allocate 1536000 bytes

It appears that they are produced while the layout is being rendered, after loading large bitmaps. The errors, however, are not produced while the bitmap is being decoded.

How can I debug these errors? Any additional pointers?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

adamp's comment was the answer in my particular case:

The framework will often capture views onscreen into temporary bitmaps for drawing performance. It looks like your app is pushing right up against its memory limit already and this bumps it over. Take a look at the other suggestions for limiting your app's memory usage.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...