C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-41
HIGHPIN
causes the value used to be determined by the first of these that has a nonzero
value:
1. The pe_heap_max value assigned to the program file by a process that
launches it
2. The heap_max attribute of the program file
If the heap_max attribute remains zero, all the user data area (minus that area
used for global data segments and the argv[] and envp[] arrays) is available for
the heap.
If you do use the HEAP pragma when compiling a native program, the space
specified must be sufficient to contain at least the global data segments and the
argv[] and envp[] arrays.
The maximum size of native user heap can be affected by the use of operating
system memory segments:
°
Flat segments are allocated in the same area, downward from its upper bound.
°
Certain products allocate segments in the same area, causing address
collisions when certain features are used; the QIO Configuration and
Management Manual provides guidance on one such instance.
°
DLL text and data segments can be loaded into the same area.
When such segments already exist, the heap area is bounded by the start of the
segment with the lowest address. An attempt to allocate a flat segment or load a
DLL can fail if the heap has already consumed the area needed.
Heap growth, like the allocation or growth of other data segments, will fail if
insufficient swap space is available for the processor.
If your program causes a run-time error message that it is out of virtual memory, try
increasing the swap file space available to it, following the guidelines in the Kernel-
Managed Swap Facility (KMSF) Manual.
HIGHPIN
The HIGHPIN pragma specifies that the object file should be run at a high PIN (256 or
greater) or at a low PIN (0 through 254)..
[NO]HIGHPIN