Font Size: a A A

Research On Java Memory Leak Discovering Techniques

Posted on:2016-08-23Degree:MasterType:Thesis
Country:ChinaCandidate:L J HongFull Text:PDF
GTID:2308330479976594Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Even though with garbage collection supports, memory leak still remains a problem for Java programs. The memory leaks may degrade runtime performance and even lead to crashes due to out of memory exceptions. The previous work on memory leak mainly focuses on finding out the causes of leaks after memory leak phenomenon occurring. However, very few work focuses on how to discover potential leak phenomenon. There lack effective solutions for leak discovering.To resolve the problem, this paper studies Java memory leak discovering techniques and proposes methods to find potential leaks from both dynamic and static perspective:(1) From dynamic perspective, the paper proposes an automated unit-level memory leak testing approach. It firstly identifies the modules with high leaking risks and generates normal unit tests for them. We then strengthen these unit tests into the ones with leak discovering ability to find potential memory leaks. With the resulted unit tests, the memory leak can be avoided as much as possible at the early stage of software development.(2) From static perspective, there are a lot of bad coding patterns which may easily lead to memory leaks. We deceloped a static pattern-based approach to scan potential leaks from source code. It can find out the memory leaks caused by incorrect uses of weak reference utilities, e.g., Weak Hash Map. By doing static analysis, we can discover memory leaks before running the programs.We implemented a memory leak discovering tool based on JUnit, Code Pro Analytix and Soot. It can discover the already known memory leak bugs in open source projects, which shows the ability of the proposed approaches. The tool can help users to eliminate the memory leak errors, and thereby improves the quality of software.
Keywords/Search Tags:Java, memory leak, unit testing, test generation, static detection
PDF Full Text Request
Related items