OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
5-8
Initializing the GPI Environment
The memory required for each object tree depends on the max-table-entries and
max-table-data parameters. The following formula applies:
OT_memory = max-table-data + (28 x max-table-entries)
where OT_memory is the amount of memory required per object tree.
To determine the total amount of memory required for the GPI library, use the following
formula:
GPILIB_memory = 524,288 + (OT_memory x num_objects)
where num_objects is the total number of objects expected to exist simultaneously in
the GPI process. The range for num_objects is 2 to 15.
Determining the GIP Memory Requirement
The majority of GIP memory space is allocated when GPI_OPEN_ is called. It is not
freed until the session is terminated with a call to GPI_CLOSE_ . (Additional GIP
memory is allocated during message transfer, as described in a following note.)
For each GIP, two internal encoded message buffers are always allocated. The
minimum value for each of these buffers is 2,097,152 bytes. If the value of
max-table-data is greater than this minimum value, then max-table-data
determines the size of each buffer.
For example, if max-table-data is 1,000,000, then the memory allocated for each
buffer is 2,097,152. If max-table-data is 3,000,000, then the memory allocated for
each buffer is 3,000,000.
The maximum size possible for each buffer is 10,485,760. Note that this is also the
maximum value allowed for max-table-data.
In addition to the message buffers, GIP memory space is also allocated for one object
tree. This memory space is determined by the formula for OT_memory above.
Therefore, to determine the total memory space required for one GIP, use one of the
following formulas:
GIP_memory = (2 x max-table-data) + OT_memory, if max-table-data
is greater than 2,097,152
or:
GIP_memory = 4,194,304 + OT_memory, if max-table-data
is less than or equal to 2,097,152