]> git.sur5r.net Git - openldap/blobdiff - libraries/liblmdb/lmdb.h
Support dynamic max MDB keysize.
[openldap] / libraries / liblmdb / lmdb.h
index 5877e957d9a32df5d1285f4165aad48da7dd3b75..4800b6e0f2c18fb80055a7e5689c87f863f433a9 100644 (file)
  *
  *     - By default, in versions before 0.9.10, unused portions of the data
  *       file might receive garbage data from memory freed by other code.
- *       (This did not happen when using the #MDB_WRITEMAP flag.) As of
+ *       (This does not happen when using the #MDB_WRITEMAP flag.) As of
  *       0.9.10 the default behavior is to initialize such memory before
  *       writing to the data file. Since there may be a slight performance
  *       cost due to this initialization, applications may disable it using
  *       the #MDB_NOMEMINIT flag. Applications handling sensitive data
- *       which must not be written, and which don't use #MDB_WRITEMAP,
- *       should not use this flag.
+ *       which must not be written should not use this flag. This flag is
+ *       irrelevant when using #MDB_WRITEMAP.
  *
  *     - A thread can only use one transaction at a time, plus any child
  *       transactions.  Each transaction belongs to one thread.  See below.
@@ -567,8 +567,8 @@ int  mdb_env_create(MDB_env **env);
         *              code (that used the heap and subsequently freed the memory) into the
         *              data file. Note that many other system libraries may allocate
         *              and free memory from the heap for arbitrary uses. E.g., stdio may
-        *              use the heap for file I/O buffers. This initialization step comes
-        *              at some performance cost so some applications may want to disable
+        *              use the heap for file I/O buffers. This initialization step has a
+        *              modest performance cost so some applications may want to disable
         *              it using this flag. This option can be a problem for applications
         *              which handle sensitive data like passwords, and it makes memory
         *              checkers like Valgrind noisy. This flag is not needed with #MDB_WRITEMAP,
@@ -797,12 +797,12 @@ int  mdb_env_get_maxreaders(MDB_env *env, unsigned int *readers);
         */
 int  mdb_env_set_maxdbs(MDB_env *env, MDB_dbi dbs);
 
-       /** @brief Get the maximum size of a key for the environment.
+       /** @brief Get the maximum size of keys and #MDB_DUPSORT data we can write.
         *
-        * This is the compile-time constant #MDB_MAXKEYSIZE, default 511.
+        * Depends on the compile-time constant #MDB_MAXKEYSIZE. Default 511.
         * See @ref MDB_val.
         * @param[in] env An environment handle returned by #mdb_env_create()
-        * @return The maximum size of a key
+        * @return The maximum size of a key we can write
         */
 int  mdb_env_get_maxkeysize(MDB_env *env);