skip to main content
OpenAccess SDK SQL Engine Core Functions API : Memory management
 

Memory management

A set of memory management functions (xm_allocTree, xm_freeTree, xm_allocItem, xm_freeItem) are provided in the API to allocate memory in a consistent and efficient manner. Using these functions, rather than malloc()and free(), avoids memory fragmentation and simplifies the implementation of memory management. Freeing is simpler because it is not necessary to keep track of the allocated pointer. As long as the items (blocks of memory) are attached to a tree, a single call to xm_freeTree() frees them all. This is also very useful to avoid memory leakage.
This chapter explains how the IP should use the memory management functions in implementing the various IP interfaces. The memory management functions are described in General Support API.
In this section: 
* OAIP_init
* OAIP_connect, OAIP_connectW
* OAIP_schema, OAIP_schemaW
* OAIP_execute
* OAIP_ddl
* OAIP_procedure