mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:04:13 +08:00
mdbx-windows: fix mmap-resize (add MEM_RESERVE afrer NtExtendSection).
This commit is contained in:
parent
8008e23cfa
commit
96a0647253
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user