June 2001
Intermediate to advanced
688 pages
19h 18m
English
Berkeley DB can allocate memory for returned key/data pairs, which then become the responsibility of the application. See DB_DBT_MALLOC or DB_DBT_ REALLOC for further information.
On systems where there may be multiple library versions of malloc (notably Windows NT), the Berkeley DB library could allocate memory from a different heap than the application will use to free it. To avoid this problem, the allocation routine to be used for allocating such key/data items can be specified by calling the DB→set_malloc or DB→set_realloc functions. If no allocation function is specified, the underlying C library functions are used.