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

Table Of Contents
Running and Debugging C and C++ Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
19-8
Large-Memory Model
The size of the extended segment is the sum of the heap size you specify during
compilation or binding and the sizes of all global and static aggregates. The physical
limit of the extended segment is 127.5 MB; the practical limit depends on paging rates
and disk space. If one of the memory-allocation functions (calloc(), malloc(), or
realloc()) cannot allocate a block of the requested size from the heap, it
automatically attempts to enlarge the extended segment.
Figure 19-1. Memory Models
Extended
Segment
User Data
Segment
Large Model
Small Model
Heap
Global and Static
Aggregates
Stack
Global and Static
Aggregates with
NOXVAR pragma
and lowmem
Aggregates
Global and Static
Scalars
Stack
Heap
Global and Static
Aggregates
Global and Static Scalars
and Pointers to Global
Aggregates
256
words
64 KB
0 KB
VST002.vsd