4. 1.1. Memory problem: Why?
• Limited heap size: 16MB, 32MB, 64MB,..
• Usually in decoding or manipulating bitmaps.
Painful in solving memory problem for low-end devices
10. 2.1. Android Bitmaps (con’t)
• Pre-Gingerbread GC (< 2.3):
– Stop all app’s threads – not stop all applications
– Full heap collection
– Pause times often > 100ms
• Gingerbread and beyond (>= 2.3):
– Mostly concurrent
– Partial collections
– Pause times usually < 5ms
• Garbage collection in Android does no compacting.
11. 2.1. Android Bitmaps (con’t)
• Decode bitmaps bugs on Android Gingerbread and
previous versions ( <= 2.3):
– https://code.google.com/p/android/issues/detail?id=8488
– If the native Bitmap allocation size plus the current
HeapSize (NOT the actually allocated size)
exceeds the limits, native Bitmap allocation will
always fail