CRE Programmer's Guide

CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
2-42
Native CRE Memory
the amount of memory available in the OSS environment might be somewhat different
than the amount available to the same process running in the Guardian environment.
Overall Memory Organization
The following table shows the maximum size for the memory segments in the native
run-time environment.
The User Heap
The native CRE manages the heap and allocates blocks from the heap to any routine
in your program that requests heap space. The C and C++ languages include syntax to
request heap space. pTAL routines can access the native CRE functions that allocate
heap space. Data allocated on the heap by a routine written in one language can be
accessed by a routine written in another language by passing the address of the data
from one routine to another. Routines that access the same data on the heap must
specify the same data layout, even if you must use language-specific syntax in each
language to describe the same data.
The native CRE selects an appropriate initial size for the user heap. The native CRE
can increase the size of the user heap once your program begins running if more heap
space is needed.
Specifying the Size of the Heap and the Stack
You can specify a smaller maximum size for the heap using a linker utility.
The main stack has a default limit of 1 MB on G-series systems and 2 MB on H-series
systems, but you can increase this to a maximum of 32 megabytes either by calling the
PROCESS_LAUNCH_ procedure or by using a linker utility.
See the:
nld Manual
noft Manual
ld Manual
eld Manual
Guardian Programmer’s Guide
for more information.
Memory Segment Maximum Size
Total of User Heap and Global Variables 128 MB for pre-G05 systems
Total of User Heap, Global Variables,
and Flat Segments
1120 MB for G05 and later systems
Stack 32 MB