OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
5-7
Initializing the GPI Environment
attribute contained within these subobjects (and used by your root object). If an attribute 
is multivalued, add an additional entry for each value present.
Suppose, for this example, that six required and optional single-valued attributes are 
used in MH-C-MESSAGE-RD, and one multivalued attribute is used (for which there 
are three values).  Further suppose that 23 single-valued attributes are used in MH-C-
OR-NAME. Adding the values for the subobjects themselves, you find the total entries 
for each instance of MH-C-MESSAGE-RD is 35.
In that case, the total entries required to process outbound root objects of this type is:
(100 x 35) + 20 + 150 + 250 = 3920
Using this estimated value for max-table-entries saves considerable memory 
space over the default value (10,000).
max-table-data specifies the maximum amount of string data that can be stored for 
each root object. The default value for max-table-data is 2,097,152 octets.  If 
string content of root objects you are processing is below the default, you might want to 
use a smaller value for max-table-data.
Allocating Swap Volume Disk Space
You must provide sufficient swap volume memory space for use by the GPI library and 
each GIP (one GIP is used per GPI session). You specify (name) the swap volume for 
the GPI library when you make a call to the GPI_INITIALIZE_ procedure. You specify 
the swap volume for each GIP process when configuring the OSI/MHS subsystem 
(when using the ADD GROUP commands that define the GI groups).
Swap volume memory must meet or exceed the amount required by the GPI library and 
GIP(s). Memory is allocated separately for the library and each GIP. For both, 
however, the amount of memory allocated is controlled by the max-table-data and 
max-table-entries parameters of GPI_INITIALIZE_ . 
The following subsections describe how to calculate GPI library and GIP memory 
requirements. For specific examples, see Example: Initializing the Environment
 on 
page 5-9.
Determining the GPI Library Memory Requirement
GPI library memory space is allocated when GPI_INITIALIZE_ is called. In the GPI 
library, 0.5 megabytes (524,288 bytes) is always allocated for environment information.  
In addition, memory is always allocated for two object trees. If more than two object 
trees are required simultaneously, additional memory is allocated for each object tree as 
needed (allocated dynamically).  This dynamic allocation might result from a call to any 
of three procedures:  GPI_MT_START_TRANSFER_IN_ , GPI_OM_CREATE_ , or 
GPI_OM_COPY_ .
A maximum of 15 object trees may be allocated by one GPI application process. The 
memory accumulates (is not freed) until GPI_INITIALIZE_ is called again. 










