Rules

No-heap real-time threads must not touch the heap. If they did, they could cause corruption in the JVM. Figure 14-1 shows an example of a destructive interaction between a thread and the garbage collector it preempts.

Figure 14-1. Example of an unregulated no-heap thread corrupting the JVM

The RTSJ does not permit a no-heap real-time thread to load or store a reference to an object in the heap. It is free to use objects in immortal or scoped memory.

The specification does not insist that each load or store[2] of a reference be checked at runtime, but references must be checked before the load or store completes. That could possibly be done ...

Get Real-Time Java™ Platform Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.