SQL/MP Programming Manual for C

HP NonStop SQL/MP Programming Manual for C429847-008
B-1
B Memory Considerations
This appendix describes the NonStop SQL internal data structures generated in a C
program and the memory considerations for these structures.
Topics include:
SQL/MP Internal Structures
Using the SQLMEM Pragma on page B-2
Estimating Memory Requirements on page B-2
Avoiding Memory Stack Overflows on page B-4
SQL/MP Internal Structures
The C compiler generates internal SQL data structures to maintain information about
the SQL statements, directives, and host variables that are used in the program.
Table B-1 lists SQL data structures and when each structure is generated.
Table B-1. SQL/MP Data Structures
SQL Data Structure Statement, Directive, or Host Variable
SQLIN SQL statement or directive that generates a call to the SQL
executor, except the following:
BEGIN DECLARE SECTION or END DECLARE SECTION
directive
CONTROL directives
INCLUDE directive
INVOKE directive
WHENEVER directive
DECLARE CURSOR statement for static cursors
DECLARE CURSOR statement for dynamic cursors that do
not use cursor or statement host variables
SQLIVARS Each input host variable specified in the program
SQLOVARS Each output host variable specified in the program