Reputation: 51
Samsung Galaxy S3 uses 32mb heapsize almost instantly on my app, where on almost any other android device it starts at +- 5mb (saw this in logcat, can send screenshots from two different devices if necessary). Think this is the reason for my app crashing with "OutOfMemory" Exception's on only the Galaxy s3, works perfectly on the galaxy Y Duos and Pocket.
Any Help/Advice on why this is happening would be greatly appreciated thanks.
Upvotes: 5
Views: 1698
Reputation: 2457
OOM in most cases is not with loading bitmaps or like this but mostly its base on GPU Read this link and this one too just look at this solution for various situation caused by OOM
Here in my case i have replace image drawables which is trying to loading from you can use drawable-nodpi
In my app, had drawable-hdpi have all the images for the app. On most devices,no issue . On the S3, the app would take 2x as much memory and then run into out of memory issue.
I just created drawable-xhdpi folder with the same contents as drawable-hdpi folder and run it on S3. Immediately noticed the memory footprint was 1/2 and no out of memory issues.
Upvotes: 0
Reputation: 4544
As told by mario, the problem is that s3 resolution is higher than those other models, so images are bigger in dimensions and, therefore, also in memory consumption.
Although it is worth to say that the S3 seems to have a little maximum heap size givin its resolution, since I have also had out of memory problems with it but not with other devices with same resolution that has a heap limit higher.
Upvotes: 1