|
![]() ![]()
|
When using the non-cursor Berkeley DB calls to retrieve key/data items under the C/C++ APIs (for example, DB->get), the memory to which the pointer stored into the DBT refers is only valid 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.)
(커서를 사용하지 않고 키/데이타 아이템을 읽을때 DBT의 포인터값은 DB핸들을 사용하는 다음 call(어떤 쓰레드나 프로세스의 디비핸들에 대한 동작)이전까지 유효하다.이같은 이유로 리턴된 하나의 DB핸들을 여러 쓰레드가 동시에 사용할때 커서를 사용하지않는 DBT나 데이타 읽기에 대해서는 DB_DBT_MALLOC, DB_DBT_REALLOC or DB_DBT_USERMEM 플레그중의 하나를 설정해야 한다.
When using the cursor Berkeley DB calls to retrieve key/data items under the C/C++ APIs (for example, DBcursor->c_get), the memory to which the pointer stored into the DBT refers is only valid until the next call to Berkeley DB using the DBC handle returned by DB->cursor.
(커서를 사용한 키/데이타 읽기의 경우 DBC핸들을 사용하는 다음 함수call까지 DBT의 멤버가 가르키는 포인터는 유효하다.)
![]() ![]()
|
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.