$CRMPSC and $CREATE Services
The $CRMPSC system service creates a process-private or global section and maps it into process address
space.The options or flags that determine its actions are described in the
OpenVMS System Services Reference Manual
The $CREATE RMS service can be used to create a new file, or to open
an existing file.The options and flags that determine its operation
are described in the OpenVMS Record Management Services (RMS) Reference
Manual.
The example code uses $CREATE with the User File Open (FAB$M_UFO) option
and various file sharing options, and then uses $CRMPSC to map the contents
of the file as a global section into image virtual address space (twice).
The code then demonstrates some basic operations on the section: data is
written into the first range of virtual address space where the section
is mapped, and then read back in via the second range.
The $UPDSEC system service (not shown) would then be used at appropriate
intervals; the call will flush the contents of the section from memory
back to the backing storage file on disk.
For information on synchronizing and interlocking access to shared memory
sections among multiple writing processes, see the data synchronization
and lock manager synchronization chapters, as well as the memory management
chapters, in the OpenVMS Programming Concepts manual.
Code Example
privacy and legal statement