Bitmap Allocations Different per phone

by MikeL » Sat, 12 Mar 2011 04:21:52 GMT


Sponsored Links
 I have an application that I am running on an HTC EVO and an HTC
Incredible.  At one point it loads in 10+ new bitmaps.  The Evo runs
fine, the Incredible runs out of memory.  I have been using 'dumpsys
meminfo' to debug the problem.  I noticed something odd right away.
These are numbers on initial boot..

EVO
** MEMINFO in pid 2677 [my.app.here] **
                         native   dalvik    other    total    limit
bitmap nativeBmp
              size:    19348     5767      N/A    25115    24576
N/A      N/A
       allocated:    17110     4794      N/A    21904      N/A
8445        0

Incredible
** MEMINFO in pid 3474 [my.app.here] **
                         native   dalvik    other    total    limit
bitmap nativeBmp
              size:    19356     5447      N/A    24803    24576
N/A      N/A
       allocated:    16589     4018      N/A    20607      N/A
11323        0

The Bitmap field is much higher on the Incredible than on the EVO.  As
I load more bitmaps this differences grows and grow until I run out of
memory with...

E/dalvikvm-heap( 3474): 515520-byte external allocation too large for
this process.
E/dalvikvm( 3474): Out of memory: Heap Size=5767KB, Allocated=3154KB,
Bitmap Size=18681KB
E/        ( 3474): VM won't let us allocate 515520 bytes

Why is it that the bitmap sizes are larger on the Incredible?  Is
there something in the OS I can look at this will explain this?

-- 



Other Threads

1. Can't specify resources for different dpi

It seems that in 0.9 SDK it is impossible to specify drawables (and
other resources) for different pixel density.
With image.png both in drawable and drawable-96dpi I get "ERROR
Resource entry image is already defined.".

Is this a known bug?
--~--~---------~--~----~------------~-------~--~----~

2. Notification -- is it persistent?

The API doc says Notification is used to present a persistent
notification to the user. What does persistent mean? Does the
notification stay persistent after phone reboots?

Thanks.
--~--~---------~--~----~------------~-------~--~----~

3. making a phone call in 0.9 beta

4. RequestQueue waitUntilComplete in 0.9 beta

5. Address.getMaxAddressLineIndex()

6. Repeating Animations

7. Calling the native Camera app to get a picture