Memory Safety for Safety Critical Java
Memory is a key resource in computer systems. Safety-critical systems often must operate for long periods of time with limited available memory. Programmers must therefore take great care to use memory sparingly and avoid programming errors. This chapter introduces the memory management API of the Safety Critical Java specification and presents a static technique for ensuring memory safety.
KeywordsVirtual Machine Garbage Collection Memory Management Annotation System Event Handler
The author thanks the JSR-302 expert group (Doug Locke, B. Scott Andersen, Ben Brosgol, Mike Fulton, Thomas Henties, James Hunt, Johan Nielsen, Kelvin Nilsen, Martin Schoeberl, Joyce Tokar, Andy Wellings) for their work on the SCJ specification and their input and comments on the memory safety annotations presented in this chapter.
This work was partially supported by NSF grants CNS-0938256, CCF-0938255, CCF-0916310 and CCF-0916350.
- 1.A. Corsaro, C. Santoro. The Analysis and Evaluation of Design Patterns for Distributed Real-Time Java Software. 16th IEEE International Conference on Emerging Technologies and Factory Automation, 2005.Google Scholar
- 54.E. Benowitz and A. Niessner. A patterns catalog for RTSJ software designs. In Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES), Lecture Notes in Computer Science, volume 2889, pages 497–507, 2003.Google Scholar
- 63.G. Bollella, T. Canham, V. Carson, V. Champlin, D. Dvorak, B. Giovannoni, M. Indictor, K. Meyer, A. Murray, and K. Reinholtz. Programming with non-heap memory in the real time specification for Java. In OOPSLA Companion, pages 361–369, 2003.Google Scholar
- 75.C. Boyapati, A. Salcianu, Jr. W. Beebee, and M. Rinard. Ownership types for safe region-based memory management in real-time Java. In PLDI’03: Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation, pages 324–337, New York, NY, USA, 2003. ACM Press.Google Scholar
- 76.V. A. Braberman, F. Fernández, D. Garbervetsky, and S. Yovine. Parametric prediction of heap memory requirements. In ISMM’08: Proceedings of the 7th international symposium on Memory management, pages 141–150, New York, 2008. ACM.Google Scholar
- 78.G. Bracha, M. Odersky, D. Stoutamire, and P. Wadler. Making the future safe for the past: Adding Genericity to the Java programming language. In OOPSLA’98 Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 1998.Google Scholar
- 99.Z. Chen. Java Card technology for Smart Cards: architecture and programmer’s guide. Addison-Wesley, 2000.Google Scholar
- 132.P. Dibble and et al. The Real-Time Specification for Java 1.0.2. Available at http://www.rtsj.org/.
- 233.T. Kalibera, J. Hagelberg, F. Pizlo, A. Plsek, B. Titzer, and J. Vitek. Cdx: a family of real-time Java benchmarks. In JTRES’09: Proceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems, pages 41–50, New York, NY, USA, 2009. ACM.Google Scholar
- 280.K. Nilsen. A type system to assure scope safety within safety-critical Java modules. In Workshop on Java Technologies for Real-time and Embedded Systems (JTRES), 2006.Google Scholar
- 297.F. Pizlo, J. M. Fox, D. Holmes, and J. Vitek. Real-time Java scoped memory: Design patterns and semantics. In Proceedings of the 7th IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC 2004), pages 101–110, 2004.Google Scholar
- 334.RTCA and EUROCAE. Software considerations in airborne systems and equipment certification. Radio Technical Commision for Aeronatics (RTCA), European Organization for Civil Aviation Electronics (EUROCAE), DO178-B, 1992.Google Scholar
- 449.T. Zhao, J. Noble, and J. Vitek. Scoped types for real-time Java. In Proceedings of the 25th IEEE International Real-Time Systems Symposium (RTSS’04), pages 241–251, Washington, DC, USA, 2004. IEEE Computer Society.Google Scholar