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:
parent
a48704925d
commit
81f17d10c8
@ -71,7 +71,9 @@ static inline void *
|
|||||||
HugeAllocate(size_t size)
|
HugeAllocate(size_t size)
|
||||||
{
|
{
|
||||||
// TODO: use MEM_LARGE_PAGES
|
// 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
|
static inline void
|
||||||
|
Loading…
Reference in New Issue
Block a user