Mechanisms for Allocating from Scoped Memory

Scoped memory might be called “temporary immortal” memory. It is never garbage collected, but it has a limited lifetime—as long as any thread has access to it. The four types of scoped memory are summarized in Table 13-2:

Table 13-2. Types of scoped memory
Allocation Time Name
Linear LTMemory
Linear LTPhysicalMemory
Variable VTMemory
Variable VTPhysicalMemory

Chapter 18 shows how memory can be allocated from particular areas of physical memory. Physical memory is mentioned in Table 13-2, but for the purposes of this chapter, it is equivalent to its nonphysical analog.

Allocation Time

Since objects in scoped memory are all freed together, the algorithm for allocation can be simple.

Algorithm 13–1 is ...

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.