Patterns for safety-critical Java memory usage

  • Authors:
  • Juan Ricardo Rios;Kelvin Nilsen;Martin Schoeberl

  • Affiliations:
  • Technical University of Denmark;Atego Systems, Inc.;Technical University of Denmark

  • Venue:
  • Proceedings of the 10th International Workshop on Java Technologies for Real-time and Embedded Systems
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Scoped memories are introduced in real-time Java profiles in order to make object allocation and deallocation time and space predictable. However, explicit scoping requires care from programmers when dealing with temporary objects, passing scope-allocated objects as arguments to methods, and returning scope-allocated objects from methods. To simplify the correct usage of scopes, programming patterns may be helpful. We present patterns for simple subroutines, sequences of subroutine calls, and nested calls, where the patterns avoid memory leaks and unnecessary copying of values. The patterns are illustrated by implementations in the safety-critical Java profile.