From 96a06472539b0f90adc504f9663dc2c67b4a05ba Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Tue, 19 Dec 2017 16:06:03 +0300 Subject: [PATCH] mdbx-windows: fix mmap-resize (add MEM_RESERVE afrer NtExtendSection). --- src/osal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osal.c b/src/osal.c index 352929f9..1068fc27 100644 --- a/src/osal.c +++ b/src/osal.c @@ -946,7 +946,7 @@ int mdbx_mresize(int flags, mdbx_mmap_t *map, size_t atleast, size_t limit) { /* growth */ uint8_t *ptr = (uint8_t *)map->address + map->current; if (ptr != - VirtualAlloc(ptr, atleast - map->current, MEM_COMMIT, + VirtualAlloc(ptr, atleast - map->current, MEM_COMMIT | MEM_RESERVE, (flags & MDBX_WRITEMAP) ? PAGE_READWRITE : PAGE_READONLY)) return GetLastError(); map->current = atleast;