Guardian Programmer's Guide

Table Of Contents
Guardian Programmer’s Guide 421922-014
A - 1
A
Mixed Data Model
Programming
The Guardian personality supports only 32-bit processes. Mixed Data Model
programming is a technique through which we can create both 32-bit and 64-bit
pointers for 32-bit processes.
Mixed mode programming is the model in which 32-bit programs can allocate 64-bit
segments using the SEGMENT_ALLOCATE64_ procedure and access these
segments using 64-bit pointers.
Using 64-bit Addressable Memory
Beginning with the H06.20/J06.09 RVUs, Guardian programs have access to up to
508GB of additional virtual memory. Using this additional address space can be of
significant benefit to programs that need access to large amounts of in-memory data.
Such programs can allocate 64-bit segments using the SEGMENT_ALLOCATE64_
procedure and then can access the segments using 64-bit pointers.
64-bit segments are allocated upward beginning at virtual address 0x100000000ULL.
Accessing Data in 64-bit Segments
In C/C++, a 64-bit pointer is declared using the _ptr64 modifier.
For example, char _ptr64 * longPtr;
To use 64-bit addressing in epTAL, you must specify the __EXT64 directive on the
com
piler run-line or within the program source prior to the first data or procedure
declaration. The epTAL compiler supporting 64-bit addressing is available in the
H06.23, J06.12 and subsequent RVUs.
With __EXT64 specified, a 64-bit pointer is declared using .EXT64:
STRING .EXT64 LONGPTR;
Setting the __EXT64 option also enables the following variable types:
EXT64ADDR - A 64-bit address
PROC64PTR - A 64-bit pointer to a procedure
Note. Mixed mode programming uses 64-bit pointers to access large segments created by
SEGMENT_ALLOCATE64_. In this way, 64-bit APIs can be used in the Guardian environment.
Note. While NSK supports up to 508GB of virtual memory for 64-bit segments, the practical
l
imit is determined by the amount of physical memory on the processor where the program is
running, and on the Kernel Managed Swap Facility (KMSF) configuration. 64-bit segments are
supported in the H06.20 and J06/09 and subsequent RVUs, but supporting system interfaces
are incomplete until the H06.24 and J06.13 RVUs.