util/HugeAllocator: enable MEM_COMMIT on Windows

Without MEM_COMMIT, the reserved address space is not accessible, and
MPD crashes.
This commit is contained in:
Max Kellermann 2014-12-17 18:45:32 +01:00
parent a48704925d
commit 81f17d10c8

View File

@ -71,7 +71,9 @@ static inline void *
HugeAllocate(size_t size)
{
// TODO: use MEM_LARGE_PAGES
return VirtualAlloc(nullptr, size, MEM_RESERVE, PAGE_READWRITE);
return VirtualAlloc(nullptr, size,
MEM_COMMIT|MEM_RESERVE,
PAGE_READWRITE);
}
static inline void