|
|
HP C/HP-UX Programmer's Guide: HP 9000 Computers > Chapter 8 Threads and Parallel
ProcessingMemory Classes |
|
In order to use memory classes in C programs, you must include the header file /usr/include/spp_prog_model.h. Memory classes are described in the Parallel Programming Guide for HP-UX Systems. In C, the general form for assigning memory is: #include <spp_prog_model.h> . . . [storage_class_specfier] memory_class_name type_specifier namelist where:
Data objects that are assigned a memory class must have a static storage duration. If the object is declared within a function, it must have the storage class extern or static. Data objects declared at file scope and assigned a memory class need not specify a storage class. A hypernode is a set of processors and physical memory organized as a symmetric multiprocessor (SMP) running a single image of the operating system microkernel. This storage class specifier causes the variables and arrays specified in namelist to be replicated in the physical memory of each hypernode on which the process is executing. While each data object has a single image in virtual memory, it maps to a different physical location on each hypernode. The threads of a process within a hypernode all share access to the copy on their hypernode and cannot access the copies on other hypernodes. |
|