Open System Services Programmer's Guide

64-Bit Heap and 32-Bit Heap for 64-Bit OSS Processes
64-Bit Heap for 64-Bit Processes
The default Heap Manager for 64-bit OSS processes manages space in the 64-bit addressable
part of process-private virtual memory. A 64-bit OSS process accesses the 64-bit heap when calling
the following functions:
calloc()
free()
malloc()
realloc()
heap_check()
heap_check_always()
NOTE: The 64-bit heap is separate from the 32-bit heap, which is accessed with equivalent OSS
32-bit memory functions, such as malloc32() and free32(). For more information about the
32-bit heap, see “32-Bit Heap for 64-Bit Processes” (page 289).
The default maximum heap size for 64-bit OSS processes is 12 GB. There are three ways to change
the maximum heap size from 12 GB:
At link time, using the -set heap_max option with the eld linker
At run time:
PROCESS_SPAWN_, tdm_spawn(), and the tdm_exec*() family of OSS functions
allow the maximum heap size to be specified.
The OSS run utility can accept a new -maxheap=N option, where N is a positive integer
for the maximum heap size and defaults to megabytes (MB), but can be (optionally)
specified with either an “MB” or “GB” (gigabytes) suffix.
64-bit and 32-bit processes can share 64-bit memory. See “Sharing Memory Between 32-Bit and
64-Bit Processes” (page 290) for additional details.
32-Bit Heap for 64-Bit Processes
A secondary Heap Manager for 64-bit OSS processes manages space in the 32-bit addressable
part of process-private virtual memory (the same address range utilized by the Heap Manager for
32-bit applications). 64-bit OSS processes can access the secondary (32-bit) heap space through
the following new OSS functions:
calloc32()
free32()
malloc32()
realloc32()
heap_check32()
heap_check_always32()
ILP32 and LP64 Data Models
The data model currently supported by NonStop C/C++ compilers on RVUs preceding H06.24
and J06.13 is called ILP32, and this is the default native data model on all H-series and J-series
RVUs. This name indicates that int, long, and pointer data types are 32 bits wide.
64-Bit OSS Processes 289