Android View Memory usage

Source: Internet
Author: User

Look at the development process, often to use the amount of memory to optimize the program.

To view the application's commands: adb shell Procrank

Shown below:

PID Vss Rss Pss Uss cmdline
79560K 74736K 49624K 43604K system_server
14335 55776K 55740K 31308K 26676K com.android.launcher2
13074 47408K 47380K 24947K 22428K com.android.settings
7626 42060K 42028K 21312K 18432K com.android.systemui
13948 32992K 32944K 11687K 9800K android.process.acore
283 25516K 25476K 8136K 7148K com.android.phone
422 24560K 24524K 7338K 6292K com.android.inputmethod.pinyin
12871 25804K 25740K 6288K 4880K com.snda.tt
454 23672K 23616K 5735K 4544K Com.google.process.gapps
14723 25744K 25684K 5706K 4100K com.rili.android.client
14844 23816K 23752K 4706K 3276K com.dopid.android
14601 23980K 23920K 4686K 3432K Android.process.media
13060 22892K 22828K 4570K 3428K com.tencent.WBlog
13303 22876K 22820K 4013K 2852K com.android.vending
13396 21672K 21608K 3978K 2960K Com.limitfan.gojuuon
4132K 4112K 3322K 3164k/system/bin/mediaserver
603 18732K 18668K 3274K 2476K Com.mediatek.mdlogger
420 18676K 18616K 3033K 2220K Com.mediatek.bluetooth
14734 21744K 21680K 3010K 1868K com.yingyonghui.market
14829 20792K 20728K 3002K 1924K com.uucun105286.android.cms
13323 20312K 20248K 2851K 1848K COM.COOTEK.SMARTINPUTV5
20008K 19932K 2680K 1556K zygote
111 2008K 2004K 1438K 1396k/system/bin/drmserver
1852K 1848K 1355K 1324k/system/bin/em_svr
108 1512K 1504K 1100K 1080K/SYSTEM/BIN/MDPD
7696 816K 812K 501K 468k/system/bin/wpa_supplicant
167 780K 776K 429K 416k/system/bin/rild
560K 556K 237K 228K/SYSTEM/BIN/MTKBT
484K 480K 234K 224k/system/bin/vold
576K 572K 229K 216k/system/bin/netd
1 284K 284K 210K 172k/init
103 424K 420K 200K 196K/SYSTEM/BIN/MTK_AGPSD
420K 416K 192K 188k/system/bin/gsm0710muxd
151 1036K 508K 181K 172k/system/bin/mdlogger
516K 512K 173K 164k/system/bin/dm_agent_binder
184K 184K 164K 164K/SBIN/ADBD
388K 384K 162K 156k/system/bin/aee_aed
106 496K 492K 161K 152k/system/bin/nvram_agent_binder
14682 416K 412K 141K 132k/system/bin/dhcpcd
14873 356K 348K 139K 132k/system/bin/sh
372K 368K 136K 128k/system/bin/hald
368K 364K 129K 124k/system/bin/installd
340K 336K 120K 116k/system/bin/atci
348K 344K 116K 112k/system/bin/mobile_log_d
152K 152K 114K 76k/sbin/ueventd
7689 340K 336K 110K 104k/system/bin/debuggerd
324K 320K 109K 104k/system/bin/netdiag
353 316K 312K 96K 92k/system/xbin/mnld
94 284K 276K 92K 88k/system/bin/dbus-daemon
146 272K 268K 92K 88k/system/bin/memsicd
368K 276K 87K 84K/SYSTEM/BIN/CCCI_FSD
102 268K 260K 87K 84k/system/bin/keystore
14681 312K 304K 81K 72k/system/bin/logwrapper
256K 248K 75K 72k/system/bin/servicemanager
252K 244K 75K 72k/system/bin/6620_launcher
7694 272K 264K 73K 68k/system/bin/logwrapper
109 232K 224K 66K 64k/system/bin/sh
98 236K 228K 59K 56k/system/bin/ccci_mdinit


Note: VSS -Virtual Set Size virtualized memory consumption (contains memory consumed by shared libraries) RSS -resident Set Size actually uses physical memory (contains memory consumed by shared libraries) PSS -Proportional Set Size actual physical memory used (proportional allocation of memory consumed by shared libraries) USS -Unique Set Size process consumes the physical memory alone (does not contain the memory occupied by the shared library)




To view the amount of memory consumed by a single application: adb shell dumpsys meminfo $包名 或者 $ process Number//Of course you can also enter the remainder of the ADB shell after entering.

Shown below:

Applications Memory Usage (KB):
uptime:70102403 realtime:104776333


* * Meminfo in PID 14335 [com.android.launcher2] * *
Native Dalvik Other Total
size:27576 8455 N/a 36031
allocated:26850 5311 N/a 32161
free:385 3144 N/a 3529
(PSS): 13830 1134 16034 30998
(Shared Dirty): 2980 1932 13776 18688
(Priv Dirty): 13736 184 12504 26424

Objects
views:0 viewroots:0
appcontexts:0 activities:0
Assets:3 Assetmanagers:3
Local binders:162 Proxy binders:81
Death recipients:1
OpenSSL sockets:0

Sql
heap:3063 memory_used:3063
pagecache_overflow:2266 malloc_size:50

DATABASES
Pgsz Dbsz lookaside (b) Dbname
1 2544 launcher.db


With these, it's much easier to debug your application's memory problems.

Android View Memory usage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.