Within a running ChorusOS system, access to persistent memory is provided by a ChorusOS actor known as the Persistent Memory Manager. The Persistent Memory Manager exports a specific API for allocating and freeing blocks of memory in the persistent memory bank. This API is distinct from the API used for allocating and de-allocating traditional ChorusOS memory regions (rgnAllocate(2K), rgnFree(2K), svPagesAllocate(2K), and svPagesFree(2K), for the following reasons:
Persistent memory blocks, by definition, persist across an actor or site restart. The API provided for manipulating traditional ChorusOS memory regions is not sufficiently rich to allow memory to be recovered after a restart.
Persistent memory blocks, unlike traditional memory regions, are named. This name is used to retrieve a block of memory which is allocated in the persistent memory bank.
Persistent memory blocks, unlike traditional memory regions, can be grouped, for the purposes of simultaneous de-allocation. In other words, a single API call can free multiple blocks of persistent memory, which may have been allocated by different actors in the ChorusOS system.
The Persistent Memory Manager API is available to all ChorusOS 4.0 actors (not just restartable actors). The aim of this chapter is to describe in detail the use of this API.