欢迎来到天天文库
浏览记录
ID:40352869
大小:3.07 MB
页数:28页
时间:2019-07-31
《Low Memory Issue debug》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、InternalUseLowMemoryIssueDebugJinqiangQiuCopyright©MediaTekInc.Allrightsreserved.InternalUseAgenda▪LinuxMemoryLayoutOverview▪LinuxKernelLowmemoryhandling▪JavaHeapOOM2InternalUseLinuxmemorylayoutVirtualaddress(0-4G)4GKernelspace3GStackStackSharelibrarySharelibraryHeapHeapProgramAProgramB03Int
2、ernalUse如何查看memorylayout▪Userspaceprocess–adbshellcat/proc/[pid]/maps▪Kernelspace–adbshellcat/proc/mtk_memconfig/memory_layout(engload)–物理地址layout•FAQ07759如何查看当前项目的physicalmemorylayout–虚拟地址layout•FAQ07760如何查看当前项目的virtualmemorylayout4InternalUseMemorylayoutexample▪不同项目会有所差异,请以实际为准5InternalUse
3、发生了lowmemory??菜单Setting->apps->runningapp计算方法请参考:RunningProcessesView.java(/packages/apps/settings/src/com/android/settings/applications)中的voidrefreshUi(booleandataChanged)可用内存已经很低》》》InternalUse发生了lowmemory??LMKKernellog里面有进程被lowmemorykiller杀掉搜索:candidate或者sigkillVSS/RSS/PSS/USS意义?请问baidu
4、g
5、oogleadj的定义:processlist.java,HIDDEN_APP_MIN_ADJ=9InternalUse发生了lowmemory??Keyword:JavaOutofmemoryorJavaHeapOutofmemoryOutOfMemoryErrorOOinmain_log.M[dalvik.vm.heapgrowthlimit]:[64m][dalvik.vm.heapsize]:[128m]8InternalUse查看内存使用的常用command▪参考FAQ04354内存不足时查看内存使用情况的一些adbcommand▪adbshellcat/proc/m
6、eminfo▪adbshellps▪adbshellcat/proc/pid/smaps▪adbshelldumpsysmeminfo▪adbshellprocrank-s(eng/userdebug)▪adbshellshowmappid(eng)9InternalUse/proc/meminfoFree=MemFree+cachedMemTotal:466564kBSwapTotal:524284kBMemFree:8860kBSwapFree:514432kBBuffers:10780kBDirty:0kBCached:98924kBWriteback:0kBSwapCa
7、ched:268kBAnonPages:190064kB此栏位若是比较大:请获取adbshellActive:150832kBMapped:86620kBcat/proc/slabinfoInactive:147600kBShmem:296kBActive(anon):94988kBSlab:57160kBInactive(anon):95400kBSReclaimable:17752kBActive(file):55844kBSUnreclaim:39408kBInactive(file):52200kBKernelStack:6504kB此栏位若是比较大:请获取adbshe
8、llcatUnevictable:1364kBPageTables:9388kB/proc/vmallocinfoMlocked:0kBNFS_Unstable:0kBHighTotal:0kBVmallocTotal:516096kBHighFree:0kBVmallocUsed:159740kBLowTotal:466564kBVmallocChunk:100356kBLowFree:8860kBInternalUsepsUSERPIDPPIDVSIZERSSWCHANPCNAMEroo
此文档下载收益归作者所有