mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 22:54: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 */
|
/* growth */
|
||||||
uint8_t *ptr = (uint8_t *)map->address + map->current;
|
uint8_t *ptr = (uint8_t *)map->address + map->current;
|
||||||
if (ptr !=
|
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))
|
(flags & MDBX_WRITEMAP) ? PAGE_READWRITE : PAGE_READONLY))
|
||||||
return GetLastError();
|
return GetLastError();
|
||||||
map->current = atleast;
|
map->current = atleast;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user