HP-UX HB v13.00 Ch-11 - Software Development

HP-UX Handbook Rev 13.00 Page 34 (of 101)
Chapter 11 Software Development
October 29, 2013
Allowing Private Data In Q3 and Q4
The chatr(1) command can be used to enable private data in the third and fourth quadrant:
chatr [ +q3p enable|disable ] [ +q4p enable|disable ] prog ### PA-RISC
chatr +as mpas prog ### Itanium
This can be done independently of the Q1 usage, it is possible for both SHARE_MAGIC and
EXEC_MAGIC executables. No relink is required for this change. This feature is called “Large Data
Space”.
On HP-UX 11.0, several patches are required in order to enable the large data space feature.
These patches are PHKL_20222-PHKL_20229 or their successors. HP-UX 11.11 and later include
this feature out of the box.
On PA-RISC, when specifying enable for the +q3p or +q4p option, the associated quadrant is
made private. The output of the chatr(1) command displays how these quadrants will be used
when the program is run:
$ chatr prog
:
third quadrant private data space disabled
fourth quadrant private data space disabled
:
Private quadrants can no longer be used to allocate shared memory. When changing both
quadrants to be private, the process cannot request shared memory from the kernel anymore. It is
still possible though to load shared libraries, but they will be loaded as private text and cannot be
shared between processes anymore. Also note that it is not supported to use only Q4 for private
data.
On Itanium, the chatr(1) command works slightly different. Instead of being allowed to change
the usage of Q3 and Q4 separately, there is an additional address space model, MPAS (Mostly
Private Address Space). This means all 4 quadrants can be used for private data, while certain
areas, e.g. shared library text, can still be shared.
Using all possibilites together allows a process to use nearly the complete 4 GB address space for
private memory:
Q1
Q2
Q3
Q4