Conference article

Early Phase Memory Leak Detection in Embedded Software Designs with Virtual Memory Management Model

Mabel Mary Joy
C-Lab, University of Paderborn, Germany

Wolfgang Mueller
C-Lab, University of Paderborn, Germany

Franz Rammig
Heinz Nixdorf Institute, University of Paderborn, Germany

Download articlehttp://dx.doi.org/10.3384/ecp13090005

Published in: Proceedings of the 4th Analytic Virtual Integration of Cyber-Physical Systems Workshop; December 3; Vancouver; Canada

Linköping Electronic Conference Proceedings 90:5, p. 25-28

Show more +

Published: 2013-11-13

ISBN: 978-91-7519-451-6

ISSN: 1650-3686 (print), 1650-3740 (online)

Abstract

Virtual platforms are gaining significant importance in early design tests of embedded software as it helps to redesign or optimize the system well advance in time and keeps flaws minimal in the production stage. As embedded system’s size gets smaller; expensive resources like memory are limited. Hence memory needs to be managed efficiently and optimally. Memory leak is a serious issue that leads to wastage of expensive memory.We propose a novel approach to detect memory leaks in early design stages of soft real-time systems with no garbage collection. Our approach utilizes a virtual platform modeled in SystemC at an abstract level using Transaction Level Modeling. The software under test is run on top of this model. Potential memory leaks in the software are detected by applying a novel hybrid method combining both static and dynamic approaches. In early design stages where a real execution environment and complete executable software are unavailable; a simulation environment and a virtual platform are necessary. Virtual platforms provide flexibility to change the target architecture to be tested. Our proposed approach runs on the virtual platform we implement. This makes our approach faster and provides early results.

Keywords

Memory leak; soft real time system; virtual prototype; memory modelling

References

[1] Michael D. Bond and Kathryn S. McKinley. Bell: bitencoding online memory leak detection. SIGPLAN Not.; 41(11):61–72; October 2006. doi: 10.1145/1168918.1168866

[2] Michael D. Bond and Kathryn S. McKinley. Leak pruning. SIGARCH Computer Architecture News; 37(1):277–288; March 2009. doi: 10.1145/2528521.1508277

[3] L. Cai and D. Gajski. Transaction level modeling: an overview. In Hardware/Software Codesign and System Synthesis; 2003. First IEEE/ACM/IFIP International Conference on; pages 19–24; 2003.

[4] Sigmund Cherem; Lonnie Princehouse; and Radu Rugina. Practical memory leak detection using guarded value-flow analysis. SIGPLAN Not.; 42(6):480–491; June 2007. doi: 10.1145/1273442.1250789

[5] James Clause and Alessandro Orso. Leakpoint: pinpointing the causes of memory leaks. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1; ICSE ’10; pages 515–524; New York; NY; USA; 2010. ACM. doi: 10.1145/1806799.1806874

[6] Dino Distefano and Ivana FilipoviÄG? . Memory leaks detection in java by bi-abductive inference. In DavidS. Rosenblum and Gabriele Taentzer; editors; Fundamental Approaches to Software Engineering; volume 6013 of Lecture Notes in Computer Science; pages 278–292. Springer Berlin Heidelberg; 2010.

[7] Nurit Dor; Michael Rodeh; and Mooly Sagiv. Checking cleanness in linked lists. In Jens Palsberg; editor; Static Analysis; volume 1824 of Lecture Notes in Computer Science; pages 115–134. Springer Berlin Heidelberg; 2000.

[8] Cal Erickson. Memory leak detection in embedded systems. Linux Journal; August 2002.

[9] David Evans; John Guttag; James Horning; and Yang Meng Tan. Lclint: a tool for using specifications to check code. SIGSOFT Softw. Eng. Notes; 19(5):87–96; December 1994. doi: 10.1145/195274.195297

[10] Thorsten Grotker. System Design with SystemC. Kluwer Academic Publishers; Norwell; MA; USA; 2002.

[11] Brian Hackett and Radu Rugina. Region-based shape analysis with tracked locations. SIGPLAN Not.; 40(1):310–323; January 2005. doi: 10.1145/1047659.1040331

[12] Reed Hastings and Bob Joyce. Purify: Fast detection of memory leaks and access errors. In In Proc. of the Winter 1992 USENIX Conference; pages 125–138; 1991.

[13] Matthias Hauswirth and Trishul M. Chilimbi. Lowoverhead memory leak detection using adaptive statistical profiling. SIGPLAN Not.; 39(11):156–164; October 2004. doi: 10.1145/1037187.1024412

[14] David L. Heine and Monica S. Lam. A practical flowsensitive and context-sensitive c and c++ memory leak detector. SIGPLAN Not.; 38(5):168–181; May 2003. doi: 10.1145/780822.781150

[15] David L. Heine and Monica S. Lam. Static detection of leaks in polymorphic containers. In Proceedings of the 28th international conference on Software engineering; ICSE ’06; pages 252–261; New York; NY; USA; 2006. ACM.

[16] M.M. Joy; M. Becker; W. Mueller; and E. Mathews. Automated source code annotation for timing analysis of embedded software. In Advanced Computing and Communications (ADCOM); 2012 18th Annual International Conference on; pages 12–18; 2012.

[17] Maria Jump and Kathryn S. McKinley. Cork: dynamic memory leak detection for garbage-collected languages. SIGPLAN Not.; 42(1):31–38; January 2007. doi: 10.1145/1190215.1190224

[18] Yungbum Jung and Kwangkeun Yi. Practical memory leak detector based on parameterized procedural summaries. In Proceedings of the 7th international symposium on Memory management; ISMM ’08; pages 131–140; New York; NY; USA; 2008. ACM.

[19] Nick Mitchell and Gary Sevitsky. Leakbot: An automated and lightweight tool for diagnosing memory leaks in large java applications. In Luca Cardelli; editor; ECOOP 2003 - Object-Oriented Programming; volume 2743 of Lecture Notes in Computer Science; pages 351–377. Springer Berlin Heidelberg; 2003.

[20] W. Mueller; M. Becker; A. Elfeky; and A. DiPasquale. Virtual prototyping of cyber-physical systems. In Design Automation Conference (ASP-DAC); 2012 17th Asia and South Pacific; pages 219–226; 2012.

[21] Gene Novark; Emery D. Berger; and Benjamin G. Zorn. Plug: Automatically tolerating memory leaks in c and c++ applications. Technical report; Technical Report UM-CS- 2008-009; University of Massachusetts; 2008. doi: 10.1145/1543135.1542521

[22] Gene Novark; Emery D. Berger; and Benjamin G. Zorn. Efficiently and precisely locating memory leaks and bloat. SIGPLAN Not.; 44(6):397–407; June 2009.

[23] Gary J. Nutt. Operating systems - a modern perspective (3. ed.). Addison-Wesley-Longman; 2004.

[24] Maksim Orlovich and Radu Rugina. Memory leak analysis by contradiction. In Proceedings of the 13th international conference on Static Analysis; SAS’06; pages 405–424; Berlin; Heidelberg; 2006. Springer-Verlag.

[25] Berhard Scholz; Johann Blieberger; and Thomas Fahringer. Symbolic pointer analysis for detecting memory leaks. SIGPLAN Not.; 34(11):104–113; November 1999. doi: 10.1145/328691.328704

[26] Jooyoung Seo; Byoungju Choi; and Suengwan Yang. A profiling method by pcb hooking and its application for memory fault detection in embedded system operational test. Inf. Softw. Technol.; 53(1):106–119; January 2011. doi: 10.1016/j.infsof.2010.09.003

[27] Ran Shaham; Elliot K. Kolodner; and Shmuel Sagiv. Automatic removal of array memory leaks in java. In Proceedings of the 9th International Conference on Compiler Construction; CC ’00; pages 50–66; London; UK; UK; 2000. Springer-Verlag.

[28] Yulei Sui; Ding Ye; and Jingling Xue. Static memory leak detection using full-sparse value-flow analysis. In Proceedings of the 2012 International Symposium on Software Testing and Analysis; ISSTA 2012; pages 254–264; New York; NY; USA; 2012. ACM.

[29] Yan Tang; Yan Tang; Qi Gao; Qi Gao; Feng Qin; and Feng Qin. Leaksurvivor: towards safely tolerating memory leaks for garbage-collected languages. In USENIX 2008 Annual Technical Conference on Annual Technical Conference; ATC’08; pages 307–320; Berkeley; CA; USA; 2008. USENIX Association.

[30] Yichen Xie and Alex Aiken. Context- and path-sensitive memory leak detection. In In Proceedings of ESEC/FSE 2005; pages 115–125. ACM Press; 2005. PMid:16011117

[31] Guoqing Xu; Michael D. Bond; Feng Qin; and Atanas Rountev. Leakchaser: helping programmers narrow down causes of memory leaks. SIGPLAN Not.; 46(6):270–282; June 2011. doi: 10.1145/1993316.1993530

[32] Henning Zabel; Wolfgang Müller; and A. Gerstlauer. Accurate rtos modelling and analysis with systemc; January 2009.

Citations in Crossref