Possible bug in dalvik of Android 2.x during Bitmap allocation?
问题 The phenomenon : First do allocation some big memory blocks in the Java side until we catche OutOfMemoryError, then free them all . Now, weird things happen: load even a small picture(e.g. width:200, height:200) by BitmapFactory.decodeXXX(decodeResource, decodeFile, ...) will throw an OutOfMemoryError! But its OK to alloc any pure Java big Object(e.g. new byte[2*1024*1024]) now! Verifying : I wrote some simple codes to verify the problem that can download here, press "Alloc" button many times