计算机科学 ›› 2014, Vol. 41 ›› Issue (Z6): 438-441.

• 软件工程与数据库技术 • 上一篇    下一篇

利用双向推导检测Java程序中的内存泄漏

张广梅,李景霞   

  1. 山东农业大学信息科学与工程学院 泰安271000;安徽农业大学信息与计算机学院 合肥230036
  • 出版日期:2018-11-14 发布日期:2018-11-14

Detecting the Memory Leak in Java Program by Bi-deduction

ZHANG Guang-mei and LI Jing-xia   

  • Online:2018-11-14 Published:2018-11-14

摘要: Java应用程序中大量使用动态内存。Java 程序运行过程中会自动对不可达的动态内存进行回收,但不能及时地对应用程序中可达但不活跃的动态内存进行回收,从而造成内存泄漏。为有效地检测内存泄漏,提出了采用双向推导进行内存泄漏检测的方法,在推导的过程中利用分离逻辑理论对应用程序中的动态内存进行分析,确定到达程序中每条语句的可达的动态内存和活跃的动态内存,辅助完成动态内存泄漏的检测。

关键词: 内存泄漏,分离逻辑,双向推导,霍尔推理规则 中图法分类号TP311文献标识码A

Abstract: Lots of dynamitic memories are used in Java program.The unreachable dynamitic memories can be collected by the garbage collector.The reachable but inactive dynamitic memories are free which may lead to memory leak.The bi-deduction method to detect memory leak in Java program is provided.It is based on separation logic.By using separation logic and the rules of Hoare logic,the dynamitic memory’s state can be achieved and the leaked memory can be detected.

Key words: Memory leak,Separation logic,Bi-deduction,Inference rule of hoare logic

[1] Wikipedia.Memory leak.http://en.wikipedia.org/wiki/Memory leak,2012-11-09
[2] Clause J,Orso A.Leakpoint:Pinpointing the Causes of Memory Leaks[C]∥International Conference on Software Engineering,2010.Cape Town,ACM New York,2010:515-224
[3] Distefano D,Filipovi’c I.Memory Leaks Detection in Java by Bi-Abductive Inference[C]∥Fundamental Approaches to Software Engineering,2010.Paphos,Cyprus,2010:278-292
[4] 刘伟.设计模式[M].北京:清华大学出版社,2011:186
[5] Reynolds J C.Separation Logic:A Logic for Shared Mutable Data Structures[C]∥17th IEEE Symposium on Logic in Computer Science,2002.Los Alamitos,IEEE Computer Society,2002:55-74
[6] 黄达明,曾庆凯.基于分离逻辑的程序验证技术[J].软件学报,2009,20(8):2051-2016
[7] Reynolds J C.An Overview of Separation Logic[M]∥Meyer B,Woodcock J.Verified Software:Theories,Tools,Experiments.Berlin Heidelberg,Springer,2008:460-469
[8] http://zh.wikipedia.org/wiki/霍尔逻辑

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!