User`s guide

Shared Memory Between Processes [4]
4.2 Persisting Shared Memory
The remember daemon rememd retains information about shared memory so that
programs preserve shared memory throughout the life cycle of the process. Shared
memory is allocated by calling mmap with the MMAP_ANON and MMAP_SHARED
flags and a valid file descriptor.
When the rememd daemon is first started, it reads in all the records from its maps
file and calls mmap to map the specified memory into its virtual address space. The
daemon does not repopulate the memory; it only allocates it and retains a reference.
rememd does not attempt to map the same memory segment twice. Once it is
mapped, rememd increments an internal reference count on subsequent remember
requests.
Calling rememd does not guarantee that the memory is reclaimed as free. If another
program is retaining a reference to the memory, it remains allocated. If multiple
requests are made to remember the same segment, rememd decrements its internal
counter for each forget request until the counter is 0 (zero), at which point, it calls
munmap.
By holding memory references, the rememd daemon allows the memory to outlast
one or more processes that might want to use the memory.
Programs that wish to make use of the functionality offered by rememd are
required to link with the libremem library. When a method is called, a remote
procedure call is made from rememd using UNIX domain sockets. The path to
use to communicate with the daemon is specified in the configuration file found
at /etc/rememd.conf or in the path specified by the environment variable
REMEMD_CONFIG_PATH.
S247920 49