Memory Leak Detection Using Adaptive Cyclic Memory Allocation

동적 순환 메모리 할당 기법을 이용한 메모리 누수 검출

  • 임우섭 (성균관대학교 임베디드소프트웨어학과) ;
  • 한환수 (성균관대학교 정보통신공학부) ;
  • 이상원 (성균관대학교 정보통신공학부)
  • Received : 2010.04.16
  • Accepted : 2010.08.03
  • Published : 2010.10.15

Abstract

There are many memory leak detection tools. However, programmers, who develop very large programs, tend to avoid testing their programs with memory leak detection tools since these tools require runtime and space overheads. Thus, we present a memory leak detection technique which enables programmers to test their modules in their unit test phase with low overheads. To achieve this goal, we extend the existing cyclic memory allocation technique and evaluate our memory leak detection technique on a tiny DBMS. In our experiments, we find our tool has reasonably low runtime and space overheads and it reports only a small number of false positives.

메모리 누수 검출을 위한 많은 도구들이 존재한다. 하자만 큰 시간적, 공간적 오버헤드로 인해 규모가 큰 제품의 개발자들은 사용을 꺼리게 된다. 이에 우리는 개발자들이 자신이 개발한 모듈만을 대상으로 유닛 테스트 시에 메모리 누수를 검출할 수 있는 기법을 고안하였다. 우리는 고정 크기 순환적 메모리 할당 기법을 우리의 목적에 맞게 확장함으로써 이것을 달성하였으며 우리의 기법을 평가하기 위해서, 간단한 데이터베이스 관리 시스템을 구현하여 그 중 일부 모듈을 대상으로 테스트 하였다. 실험 결과 우리 기법은 유닛 테스트 시에 적은 시간적, 공간적 오버헤드와 거짓 검출을 가졌다.

Keywords

References

  1. Valgrind-project., Available: http://www.valgrind.org
  2. H. H. Nguyen and M. Rinard, "Detecting and Eliminating Memory Leaks Using Cyclic Memory Allocation," In International Symposium on Memory Management(ISMM), pp.15-30, October 2007.
  3. T. M. Chilimbi and M. Hauswirth, "Low-Overhead Memory Leak Detection Using Adaptive Statistical Profiling," In Architectural Support for Programming Languages and Operating Systems(ASPLOS), pp.156-164, October 2004.
  4. C. K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. J. Reddi, and K. Hazelwood, "Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation," In Programming Languages Design and Implementation(PLDI), pp.190-200, June 2005.
  5. The Linux man-pages project., Available: http://www.kernel.org/doc/man-pages/online/pages/man3/malloc_hook.3.html
  6. RedBase Project., Available: http://infolab.stanford.edu/-widom /cs346/project.html
  7. D. L. Heine and M. S. Lam, "A Practical Flow- Sensitive and Context-Sensitive C and C++ Memory Leak detector," In ACM SIGPLAN Conference on Programming Language Design and Implementation(PLDI), pp.168-181, 2003.
  8. Y. Xie and A. Aiken, "Context- and Path-Sensitive Memory Leak Detection," In the 5th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESAC/FSE), pp.115-125, 2005.
  9. S. Cherem, L. Princehouse, and R. Rugina, "Practical Memory Leak Detection using Guarded Value-flow Analysis," In the 2007 ACM SIGPLAN Conference on Programming language design and implementation(PLDI), pp.480-491, 2007.
  10. G. Novark and E. D. Berger, "Efficiently and Precisely Locating Memory Leaks and Bloat," In Programming Languages Design and Implementation(PLDI), pp.397-407, 2009.
  11. R. Hastings and B. Joyce, "Fast Detection of Memory Leaks and Access Errors," In the Winter '92 USENIX conference, pp.125-136, 1992.
  12. Microsoft TechNet, Microsoft Corporation, "Memory Leak Diagnoser," 2007.
  13. M. D. Bond and K. S. McKinley, "Tolerating Memory Leaks," In the 23rd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications(OOPSLA), pp.109-126, 2008.
  14. Y. Tang, Q. Gao, and F. Qin, "LeakSurvivor: Towards Safely Tolerating Memory Leaks for Garbage-Collected Languages," In the 2008 USENIX Annual Technical Conference, pp.307-320, 2008.