Actually, there is no guarantee that Windows will map newly written
data, so we need VirtualAlloc even for non-WRITEMAP.
This commit is contained in:
Howard Chu 2016-01-16 17:11:36 +00:00
parent d6995599b4
commit a6ccef73ed

View file

@ -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,