Skip to Main Content
The real-time specification for Java (RTSJ) offers the predictable memory management needed for real-time applications, while maintaining Java 's advantages of portability and ease of use. RTSJ's scoped memory allows object lifetimes to be controlled in groups, rather than individually as in C++. While easier than individual object lifetime management, scoped memory adds programming complexity from strict rules governing memory access across scopes. Moreover, memory leaks can potentially create jitter and reduce performance. To manage the complexities of RTSJ's scoped memory, we developed patterns and tools for RTZen, a real-time CORBA Object Request Broker (ORB). We describe four new patterns that enable communication and coordination across scope boundaries, an otherwise difficult task in RTSJ. We then present IsoLeak, a runtime debugging tool that visualizes the scoped hierarchies of complex applications and locates memory leaks. Our empirical results show that RTZen is highly predictable and has acceptable performance. RTZen therefore demonstrates that the use of patterns and tools like IsoLeak can help applications meet the stringent QoS requirements of DRE applications, while supporting safer, easier, cheaper and faster development in real-time Java.