Scoped Physical Memory

There are two types of scoped physical memory: LTPhysicalMemory and VTPhysicalMemory. Like ImmortalPhysicalMemory, these scoped physical memory classes behave like their built-in analogs except for their memory constraints.

Scoped physical memory objects can be created whenever you would create a regular scoped memory object. In particular, they will frequently be created in other scopes. Example 18-1 shows the use of scoped physical memory.

Example 18-1. Using Scoped Physical Memory
 class Action implements Runnable{ int j; public void run() { // Memory allocated by Integer.valueOf // will be allocated in "fast" memory Integer n = Integer.valueOf(args[j]); intArgs[j] = n.intValue(); } } // Get 8k of fast memory fast = ...

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.