From 81f17d10c8a817cd9f2b40608c7ccdf5d038ad8a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 17 Dec 2014 18:45:32 +0100 Subject: util/HugeAllocator: enable MEM_COMMIT on Windows Without MEM_COMMIT, the reserved address space is not accessible, and MPD crashes. --- src/util/HugeAllocator.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/HugeAllocator.hxx b/src/util/HugeAllocator.hxx index e02e69f10..fa45e5610 100644 --- a/src/util/HugeAllocator.hxx +++ b/src/util/HugeAllocator.hxx @@ -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 -- cgit v1.2.3