Actually, there is no guarantee that Windows will map newly written
data, so we need VirtualAlloc even for non-WRITEMAP.
rawpart
Howard Chu 9 years ago
parent d6995599b4
commit a6ccef73ed
  1. 2
      libraries/liblmdb/mdb.c

@ -2429,7 +2429,7 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp)
goto fail;
}
#ifdef _WIN32
if (env->me_flags & MDB_WRITEMAP) {
if (!(env->me_flags & MDB_RDONLY)) {
void *p;
p = (MDB_page *)(env->me_map + env->me_psize * pgno);
p = VirtualAlloc(p, env->me_psize * num, MEM_COMMIT,

Loading…
Cancel
Save