MDB_WRITEMAP top-level constant

int const MDB_WRITEMAP

Use a writeable memory map instead of malloc/msync for database operations.

When used:

  • Provides faster database operations
  • Increases vulnerability to system crashes
  • Maps data directly into memory

Common usage scenarios:

  • High-performance requirements
  • Systems with reliable power/hardware
  • When speed is priority over crash safety

Example:

await db.init(path,
    flags: LMDBFlagSet()..add(MDB_WRITEMAP));

Warning:

  • Experimental on Windows
  • Disabled in Windows test suite
  • Often combined with MDB_MAPASYNC

Implementation

const MDB_WRITEMAP = bindings.MDB_WRITEMAP;