C:THESIS08

Summary

Compiler Support for Memory Management with Explicit Memory Reclamation. Sigmund Cherem. . PhD thesis, Cornell University, August 2008.
(PDF)

Abstract

Memory management plays a key role in the performance and reliability of modern software systems. Manual memory management (in languages such as C and C++) allows programmers to reclaim data in their programs in an efficient and predictable manner. However, manually reclaiming memory is error-prone and difficult to debug using traditional program testing. On the other hand, automatic memory reclamation via garbage collection (in languages such as Java, C#, or ML) eliminates memory errors, but can introduce program pauses and runtime overhead that can be unsuitable for some programs, such as embedded applications with real-time constraints.

This thesis describes compiler techniques to support and improve safe memory management, both in programs that have explicit memory reclamation (C) and in programs that do not (Java). For the former, we present a tool that helps programmers debug memory errors by statically detecting common programming mistakes, such as memory leaks and double frees. For the latter, we study a variety of compiler analyses and transformations that insert memory deallocation code. This approach is automatic, ensures memory safety, is likely to incur little run-time overhead, and provides real-time guarantees.

The proposed analysis technology is valuable in a larger context that goes well beyond the scope of memory management. Analysis clients such as program understanding tools, debugging tools, or other compiler transformations could greatly benefit from the information that our analyses extract, such as the lightweight method summaries or the reference uniqueness information.

This thesis formalizes our analysis techniques and presents theoretical and experimental results. We show that our error-detection tool for C has found more than 60 memory leaks in standard benchmarks and open source applications. We also show that our compile-time memory reclamation techniques for Java can reduce program's memory utilization by half. They can also reduce memory management's runtime overhead by 30% when combined with garbage collection.

Bibtex entry

@PHDTHESIS { C:THESIS08,
    AUTHOR = { Sigmund Cherem },
    TITLE = { Compiler Support for Memory Management with Explicit Memory Reclamation },
    SCHOOL = { Cornell University },
    MONTH = { August },
    YEAR = { 2008 },
    URL = { http://www.cs.cornell.edu/w8/~siggi/getfile.php?thesis.pdf },
    ABSTRACT = { Memory management plays a key role in the performance and reliability of modern software systems. Manual memory management (in languages such as C and C++) allows programmers to reclaim data in their programs in an efficient and predictable manner. However, manually reclaiming memory is error-prone and difficult to debug using traditional program testing. On the other hand, automatic memory reclamation via garbage collection (in languages such as Java, C#, or ML) eliminates memory errors, but can introduce program pauses and runtime overhead that can be unsuitable for some programs, such as embedded applications with real-time constraints. <br>This thesis describes compiler techniques to support and improve safe memory management, both in programs that have explicit memory reclamation (C) and in programs that do not (Java). For the former, we present a tool that helps programmers debug memory errors by statically detecting common programming mistakes, such as memory leaks and double frees. For the latter, we study a variety of compiler analyses and transformations that insert memory deallocation code. This approach is automatic, ensures memory safety, is likely to incur little run-time overhead, and provides real-time guarantees. <br>The proposed analysis technology is valuable in a larger context that goes well beyond the scope of memory management. Analysis clients such as program understanding tools, debugging tools, or other compiler transformations could greatly benefit from the information that our analyses extract, such as the lightweight method summaries or the reference uniqueness information. <br>This thesis formalizes our analysis techniques and presents theoretical and experimental results. We show that our error-detection tool for C has found more than 60 memory leaks in standard benchmarks and open source applications. We also show that our compile-time memory reclamation techniques for Java can reduce program's memory utilization by half. They can also reduce memory management's runtime overhead by 30% when combined with garbage collection. },
}