摘要
因为部分开发人员对Android内存管理机制理解模糊,所以Android应用程序的内存泄漏问题较为常见.为了解决内存泄漏的检测问题,首先分析了Android系统的内存管理机制,通过代码分析找出了Android应用内存泄漏的原因,并根据内存泄漏与组件、资源访问的相关性进行分类.在此基础上,提出了一种Android应用内存泄漏检测模型.该模型使用静态分析方法在反编译Android应用程序源码的基础上监测所有可能的内存泄漏代码,针对不同的代码缺陷类型使用不同的算法进行监测.通过实验分析,模型的检测正确率达到96.3%,优于自动化分析工具Lint,能够有效检测Android应用中的内存泄漏.
Memory leakage in Android application development is very common.Some application developers have a vague understanding of Android memory management mechanism,which has a certain impact on Android system.In order to solve the problem of memory leakage detection,this paper analyzed the memory management mechanism of Android system at first,and classified them according to the Android component and resource access.On the basis of accurate classification,a memory leak detection model for Android applications based on static analysis method was proposed.Through experimental analysis,the detection accuracy of the model reaches 96.3%,which is better than the automatic analysis tool of Lint,and can effectively detect memory leakage in Android applications.
作者
沙有闯
胡学钢
付贤政
袁明磊
SHA You-chuang;HU Xue-gang;FU Xian-zheng;YUAN Ming-lei(School of Computing and Information,Hefei University of Technology,Hefei 230601,China;Department of Information,Anhui Vocational College of Defense Technology,Lu an 237011,China;Department of Computer Science and Technology,Nanjing University,Nanjing 210023,China)
出处
《吉林师范大学学报(自然科学版)》
2021年第2期83-91,共9页
Journal of Jilin Normal University:Natural Science Edition
基金
安徽省高校学科(专业)拔尖人才学术资助项目(gxbjZD2020126)
安徽省教育厅自然科学研究重点项目(KJ2019A1183)
安徽省教育厅质量工程项目(2018sxzx31,2019dsgzs38,2020zyq17)。