btree(3) Library Functions Manual btree(3) btree - btree (libc -lc) #include #include : glibc 2.1. glibc 2.2 glibc . (APIs) libdb . dbopen(3) . btree. dbopen(3) btree. btree / . btree dbopen(3) : typedef struct { unsigned long flags; unsigned int cachesize; int maxkeypage; int minkeypage; unsigned int psize; int (*compare)(const DBT *key1, const DBT *key2); size_t (*prefix)(const DBT *key1, const DBT *key2); int lorder; } BTREEINFO; : flags OR : R_DUP . dbopen(3) R_NOOVERWRITE. R_DUP R_NOOVERWRITE R_NOOVERWRITE . / get seq R_CURSOR "" . cachesize () . . . / . ( ) . cachesize 0 ( ) . maxkeypage . . minkeypage . minkeypage . minkeypage 0 ( ) 2. psize () . 512 64 . psize 0 ( ) / . compare Compare . . . compare NULL ( ) . prefix Prefix . . . . prefix NULL ( ) . prefix NULL . lorder (byte order) . (big endian) 4,321. lorder 0 ( ) . ( O_TRUNC) flags lorder psize . . / . btree . . btree O lg base N base . btrees . . btree errno dbopen(3). (big endian) (little endian) . dbopen(3), hash(3), mpool(3), recno(3) The Ubiquitous B-tree, Douglas Comer, ACM Comput. Surv. 11, 2 (June 1979), 121-138. Prefix B-trees, Bayer and Unterauer, ACM Transactions on Database Systems, Vol. 2, 1 (March 1977), 11-26. The Art of Computer Programming Vol. 3: Sorting and Searching, D.E. Knuth, 1968, pp 471-480. 3 . . : . 6.18 21 2025 btree(3)