开发者

Memory Leak in Android Phone

I have seen some memory leak in my phone.

Steps :

  1. Open Browser (Home Page : www.google.com). It will fetch the Page.
  2. Select Back Key to come out from browser (close).
  3. Repeat the same steps (1-2) for 5 times.

Observer following data by "adb shell dumpsys meminfo PID (of browser) :

First Time (when open browser first time - After Step 1):

Applications Memory Usage (kB): Uptime: 428816 Realtime: 434932

** MEMINFO in pid 899 [com.android.browser] **

                  native   dalvik    other    total
          size:    24296     6727      N/A    31023
     allocated:    24241     3955      N/A    28196
          free:       54     2772      N/A     2826
         (Pss):     3455     2259    30025    35739


(shared dirty):     2064     1772     7444    11280

  (priv dirty):     3388      548    21116    25052

 Objects

           Views:        0        ViewRoots:        0
     AppContexts:        0       Activities:        0
          Assets:        3    AssetManagers:        3
   Local Binders:       34    Proxy Binders:       28
Death Recipients:        1
 OpenSSL Sockets:        0

Second Time (After Step - 4) Opening - Closing of Browser 5 times :

Applications Memory Usage (kB): Uptime: 473642 Realtime: 479758

** MEMINFO in pid 899 [com.android.browser] **

                  native   dalvik    other    total
          size:    45616     7559      N/A    53175
     allocated:    45322     4850      N/A    50172
          free:       29     2709      N/A     2738
         (Pss):     4602     2301    51988    58891

(shared dirty):     2060     1736     7440    11236

  (priv dirty):     4536      584    42360    47480

Objects

            Views:        0        ViewRoots:        0
      AppContexts:        0       Activities:        0
           Assets:        3    AssetManagers:        3
    Local Binders:      113    Proxy Binders:       47
 Death Recipients:        1
  OpenSSL Sockets:        0

Could you please help us to find out what data here shows which information (like what is Size, Allocated, free, Local Binders etc) and where in above data it is show开发者_运维技巧ing that there is memory leak.

New to all these analysis so asking basic questions :-(

Please help me for this.

Thanks Rke


You know, I don't really see a memory leak here. The most common way to get memory leak is to have references to Activity which had to be destroyed. Anyway, there is a way to search for leak, there is a good article in Android developers blog about memory analysis in Eclipse with MAT and there is also a video from Google IO-2011. Try it, and maybe you'll find what's wrong.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜