On the Android Emulator, when I exit my app and run it again immediately, I get
OutOfMemoryError: bitmap size exceeds VM budget.
But on the device itself, this does not happen. Why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On a emulator the default max heap size is around 13MB.
On a device, it depends of the phone and of the android version. On my Motorola Droid, the max heap size is around 21-22MB and on my HTC Desire it’s around 32MB.
That’s why you have a crash on the emulator and not on your device.
If you want to monitor the heap size of your application you can call a similar method: