Commit 81f17d10 authored by Max Kellermann's avatar Max Kellermann

util/HugeAllocator: enable MEM_COMMIT on Windows

Without MEM_COMMIT, the reserved address space is not accessible, and MPD crashes.
parent a4870492
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment