CRE Programmer's Guide

CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
2-38
TNS CRE Memory
TNS CRE data in the upper 32K words includes pointers to additional data items,
some of which might be in extended memory.
The TNS CRE maintains a pointer at word 0 of the user data segment (G[0]) to the
TNS CRE’s Master Control Block (MCB). The TNS CRE and the run-time libraries
use the MCB pointer at G[0] to locate their private data.
The TNS CRE maintains a pointer at word 1 of the user data segment (G[1]) to the
TNS CREs Heap Control Block (HCB).
Figure 2-14. Organization of a Small-Memory-Model Program Running in the
TNS CRE
215VST .VSD
CRE Data
Run-Time Library Data
User Data Stack
User Heap
(#HEAP)
User Global Data
Heap Control Block (HCB) Pointer
Master Control Block (MCB) Pointer
64K
32K
G[2]
G[1]
G[0]
User Data Segment