请参考下面的1)2)3)抓取对应的信息,若需要MTK协助,请提供下面的信息,并将mtklog文件夹也一并附上
1) Use adb shell cat /proc/meminfo to calculate the free memory, as usual the free memory is MemFree + cached
taking the follow example, te free memory is 5616K + 158632K
cat proc/meminfo
MemTotal: 483724 kB
MemFree: 5616 kB
Buffers: 2732 kB
Cached: 158632 kB
SwapCached: 0 kB
Active: 277336 kB
Inactive: 83232 kB
Active(anon): 197452 kB
Attention,in the phone menu setting->apps->running app, the free memory is MemFree + cached + background running app memory - SECOND_SERVER_MEM,you can refer to the follwoing for details:the function void refreshUi(boolean dataChanged) in RunningProcessView.java(/alps/package/apps/settings/src/com/android/setting/applications) (Related FAQ09452How to calculate cached free memory?)
2) Use adb shell procrank (Just ENGload) to find which process consume most memory, please refer to PSS
adb shell procrank
PID Vss Rss Pss Uss cmdline
476 65312K 65284K 38499K 35560K com.android.launcher
268 54916K 54880K 30001K 27000K system_server
110 32196K 28988K 18924K 12432K /system/bin/surfaceflinger
347 42400K 42320K 15445K 10704K com.android.systemui
3) For the process in 2) who consume most memory, use adb shell showmap [pid] (Just ENG load) to more details. Take system_server for example, first get the pid by adb shell ps system_server:
adb shell ps system_server
USER PID PPID VSIZE RSS WCHAN PC NAME
system 268 111 406736 54876 ffffffff 400e9c70 S system_server
Then adb shell showmap 268 to find every .so and heap, stack memory consume. Refer to the PSS