计算机科学与探索
計算機科學與探索
계산궤과학여탐색
JOURNAL OF FRONTIERS OF COMPUTER SCIENCE & TECHNOLOGY
2014年
8期
978-988
,共11页
于巧%姜淑娟%王兴亚%鞠小林%董庆杰
于巧%薑淑娟%王興亞%鞠小林%董慶傑
우교%강숙연%왕흥아%국소림%동경걸
泄漏对象%动态检测%堆栈信息%内存泄漏度
洩漏對象%動態檢測%堆棧信息%內存洩漏度
설루대상%동태검측%퇴잔신식%내존설루도
leaking objects%dynamic detection%stack information%memory leaking confidence
程序运行过程中一些不再被使用的对象未及时释放会引发内存泄漏问题,泄漏对象经过长期累积会降低系统性能,甚至导致系统崩溃。针对Java程序中的内存泄漏问题,提出了一种内存泄漏对象检测与度量方法。通过动态跟踪源程序的执行过程,周期性记录堆栈信息,并分析堆中可疑的泄漏对象。定义内存泄漏度计算方法,度量不同对象对程序泄漏的影响程度,从而确定产生泄漏的对象。最后选取两个开源程序进行验证,并与两种现有方法进行对比,结果表明该方法的泄漏检测率较高。
程序運行過程中一些不再被使用的對象未及時釋放會引髮內存洩漏問題,洩漏對象經過長期纍積會降低繫統性能,甚至導緻繫統崩潰。針對Java程序中的內存洩漏問題,提齣瞭一種內存洩漏對象檢測與度量方法。通過動態跟蹤源程序的執行過程,週期性記錄堆棧信息,併分析堆中可疑的洩漏對象。定義內存洩漏度計算方法,度量不同對象對程序洩漏的影響程度,從而確定產生洩漏的對象。最後選取兩箇開源程序進行驗證,併與兩種現有方法進行對比,結果錶明該方法的洩漏檢測率較高。
정서운행과정중일사불재피사용적대상미급시석방회인발내존설루문제,설루대상경과장기루적회강저계통성능,심지도치계통붕궤。침대Java정서중적내존설루문제,제출료일충내존설루대상검측여도량방법。통과동태근종원정서적집행과정,주기성기록퇴잔신식,병분석퇴중가의적설루대상。정의내존설루도계산방법,도량불동대상대정서설루적영향정도,종이학정산생설루적대상。최후선취량개개원정서진행험증,병여량충현유방법진행대비,결과표명해방법적설루검측솔교고。
Memory leaks occur when objects that are no longer used cannot be released promptly during the execu-tion of programs. After long-term accumulation, leaking objects will reduce system performance and cause the system to crash when they become serious. To solve memory leaks in Java programs, this paper proposes a detection and measurement method of memory leaking objects. Firstly, through tracing the execution of source programs dynami-cally, this method records stack information periodically and analyzes the suspicious leaking objects in heap. Then it defines a formula for calculating memory leaking confidence, which can measure the influence of different objects on program leaks, thereby confirming the leaked objects. Finally, this paper chooses two open-source programs for verification, and compared with two existing methods, the results show that the proposed method gets higher leak detection rate.