mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 01:34:12 +08:00
mdbx: minor refine mdbx.h
Change-Id: I5fee861582987cc11a648a3365b19c28e493317d
This commit is contained in:
parent
26641d839b
commit
1573d110f6
26
mdbx.h
26
mdbx.h
@ -722,8 +722,8 @@ void LIBMDBX_API NTAPI mdbx_dll_handler(PVOID module, DWORD reason,
|
|||||||
|
|
||||||
/* Opaque structure for a database environment.
|
/* Opaque structure for a database environment.
|
||||||
*
|
*
|
||||||
* An environment supports multiple databases, all residing in the same
|
* An environment supports multiple key-value databases (aka key-value spaces
|
||||||
* shared-memory map. */
|
* or tables), all residing in the same shared-memory map. */
|
||||||
typedef struct MDBX_env MDBX_env;
|
typedef struct MDBX_env MDBX_env;
|
||||||
|
|
||||||
/* Opaque structure for a transaction handle.
|
/* Opaque structure for a transaction handle.
|
||||||
@ -907,11 +907,20 @@ LIBMDBX_API char *mdbx_dump_val(const MDBX_val *key, char *const buf,
|
|||||||
/* MDBX_WRITEMAP = map data into memory with write permission.
|
/* MDBX_WRITEMAP = map data into memory with write permission.
|
||||||
*
|
*
|
||||||
* Use a writeable memory map unless MDBX_RDONLY is set. This uses fewer mallocs
|
* Use a writeable memory map unless MDBX_RDONLY is set. This uses fewer mallocs
|
||||||
* but loses protection from application bugs like wild pointer writes and other
|
* and requires much less work for tracking database pages, but loses protection
|
||||||
* bad updates into the database. This may be slightly faster for DBs that fit
|
* from application bugs like wild pointer writes and other bad updates into the
|
||||||
* entirely in RAM, but is slower for DBs larger than RAM. Also adds the
|
* database. This may be slightly faster for DBs that fit entirely in RAM, but
|
||||||
* possibility for stray application writes thru pointers to silently corrupt
|
* is slower for DBs larger than RAM. Also adds the possibility for stray
|
||||||
* the database. Incompatible with nested transactions.
|
* application writes thru pointers to silently corrupt the database.
|
||||||
|
* Incompatible with nested transactions.
|
||||||
|
*
|
||||||
|
* NOTE: The MDBX_WRITEMAP mode is incompatible with nested transactions, since
|
||||||
|
* this is unreasonable. I.e. nested transactions requires mallocation of
|
||||||
|
* database pages and more work for tracking ones, which neuters a
|
||||||
|
* performance boost caused by the MDBX_WRITEMAP mode.
|
||||||
|
*
|
||||||
|
* NOTE: MDBX don't allow to mix processes with and without MDBX_WRITEMAP on
|
||||||
|
* the same environment. In such case MDBX_INCOMPATIBLE will be generated.
|
||||||
*
|
*
|
||||||
* - with MDBX_WRITEMAP = all data will be mapped into memory in the read-write
|
* - with MDBX_WRITEMAP = all data will be mapped into memory in the read-write
|
||||||
* mode. This offers a significant performance benefit, since the data will
|
* mode. This offers a significant performance benefit, since the data will
|
||||||
@ -925,9 +934,6 @@ LIBMDBX_API char *mdbx_dump_val(const MDBX_val *key, char *const buf,
|
|||||||
* mode. This requires stocking all modified database pages in memory and
|
* mode. This requires stocking all modified database pages in memory and
|
||||||
* then writing them to disk through file operations.
|
* then writing them to disk through file operations.
|
||||||
*
|
*
|
||||||
* NOTE: MDBX don't allow to mix processes with and without MDBX_WRITEMAP on
|
|
||||||
* the same environment. In such case MDBX_INCOMPATIBLE will be generated.
|
|
||||||
*
|
|
||||||
* This flag affects only at environment opening but can't be changed after. */
|
* This flag affects only at environment opening but can't be changed after. */
|
||||||
#define MDBX_WRITEMAP 0x80000u
|
#define MDBX_WRITEMAP 0x80000u
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user