Commit 485465b6 authored by Kris Zyp's avatar Kris Zyp Committed by Howard Chu
Browse files

ITS#9017 LMDB: allow using fixed file size on Windows

parent dfb3bbed
......@@ -4760,7 +4760,14 @@ mdb_env_map(MDB_env *env, void *addr)
alloctype = MEM_RESERVE;
}
#ifdef MDB_FIXEDSIZE
LARGE_INTEGER fsize;
fsize.LowPart = msize & 0xffffffff;
fsize.HighPart = msize >> 16 >> 16;
rc = NtCreateSection(&mh, access, NULL, &fsize, secprot, SEC_RESERVE, env->me_fd);
#else
rc = NtCreateSection(&mh, access, NULL, NULL, secprot, SEC_RESERVE, env->me_fd);
#endif
if (rc)
return mdb_nt2win32(rc);
map = addr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment