mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-23 01:48:21 +08:00
mdbx: fix readonly mapping for Windows.
Change-Id: Ie301d7af74ff91e802aa78af8cfb329f587137ee
This commit is contained in:
parent
d14ca5cc4f
commit
7812476518
@ -882,7 +882,7 @@ int mdbx_mmap(int flags, mdbx_mmap_t *map, size_t must, size_t limit) {
|
|||||||
if (!NT_SUCCESS(rc))
|
if (!NT_SUCCESS(rc))
|
||||||
return ntstatus2errcode(rc);
|
return ntstatus2errcode(rc);
|
||||||
|
|
||||||
SIZE_T ViewSize = limit;
|
SIZE_T ViewSize = (flags & MDBX_RDONLY) ? 0 : limit;
|
||||||
rc = NtMapViewOfSection(
|
rc = NtMapViewOfSection(
|
||||||
map->section, GetCurrentProcess(), &map->address,
|
map->section, GetCurrentProcess(), &map->address,
|
||||||
/* ZeroBits */ 0,
|
/* ZeroBits */ 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user