Hi,

I have written a program that collects application memory usage at specific 
interval through ActivityManager.  In ICS, the program works just fine, but 
in JB, it seems that the native pss information queried from AM are wrong.  
They seems to be too low, usually below 40kB and remain that low regardless 
of what the applications being monitored are doing.

I also tried to run "adb shell dumpsys meminfo system" on both Galaxy Nexus 
ICS and JB and the outputs seem to show the same issue observed in the 
native memory data queried from AM.

   - In ICS

Applications Memory Usage (kB):
Uptime: 63638 Realtime: 63628

** MEMINFO in pid 182 [system] **
                         Shared  Private     Heap     Heap     Heap
                   Pss    Dirty    Dirty     Size    Alloc     Free
                ------   ------   ------   ------   ------   ------
       Native     3393      744     3368    13116    10245      578
       Dalvik    11339    14060    10868    20487    20139      348
       Cursor       12        0       12                           
       Ashmem       54       28       40                           
    Other dev    20581     9032      892                           
     .so mmap     4638     1784     1508                           
    .jar mmap        0        0        0                           
    .apk mmap     1356        0        0                           
    .ttf mmap      436        0        0                           
    .dex mmap        0        0        0                           
   Other mmap     3422        8       28                           
      Unknown     5800      176     5796                           
        TOTAL    51031    25832    22512    33603    30384      926
...

   - In JB:

$ adb shell dumpsys meminfo system
Applications Memory Usage (kB):
Uptime: 11835289 Realtime: 71935566

** MEMINFO in pid 560 [system] **
                         Shared  Private     Heap     Heap     Heap
                   Pss    Dirty    Dirty     Size    Alloc     Free
                ------   ------   ------   ------   ------   ------
       Native     4817      428     4772    18272    13598     1641
       Dalvik    16321     6944    16140    24803    20546     4257
       Cursor       12        0       12                           
       Ashmem       30       52        4                           
    Other dev     3020       52     3016                           
     .so mmap     1850      528      992                           
    .jar mmap        0        0        0                           
    .apk mmap      147        0        0                           
    .ttf mmap       14        0        0                           
    .dex mmap     2743      360      236                           
   Other mmap     2791        4       20                           
      Unknown     2381       76     2264                           
        TOTAL    34126     8444    27456    43075    34144     5898
...

Does anyone know if this is the expected behavior or potentially issue in 
JB?  If this is the correct behavior for AM and dumpsys in JB, is there 
another way to get the native memory usage in JB?  Thanks.

Regards,
Hendra

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to