mdbx: fix readonly mapping for Windows.

Change-Id: Ie301d7af74ff91e802aa78af8cfb329f587137ee
This commit is contained in:
Leonid Yuriev 2018-01-07 17:06:11 +03:00 committed by Leo Yuriev
parent d14ca5cc4f
commit 7812476518

View File

@ -882,7 +882,7 @@ int mdbx_mmap(int flags, mdbx_mmap_t *map, size_t must, size_t limit) {
if (!NT_SUCCESS(rc))
return ntstatus2errcode(rc);
SIZE_T ViewSize = limit;
SIZE_T ViewSize = (flags & MDBX_RDONLY) ? 0 : limit;
rc = NtMapViewOfSection(
map->section, GetCurrentProcess(), &map->address,
/* ZeroBits */ 0,