June 2001
Intermediate to advanced
688 pages
19h 18m
English
When using the non-cursor Berkeley DB calls to retrieve key/data items under the C/C++ APIs (for example, DB→get), the memory referenced by the pointer stored into the DBT is valid only until the next call to Berkeley DB using the DB handle. (This includes any use of the returned DB handle, including by another thread of control within the process. For this reason, when multiple threads are using the returned DB handle concurrently, one of the DB_DBT_MALLOC, DB_DBT_REALLOC, or DB_DBT_USERMEM flags must be specified with any non-cursor DBT used for key or data retrieval.)
When using the cursor Berkeley DB calls to retrieve key/data items under the C/C++ APIs (for example, DBcursor→c_get), the memory referenced ...