diff options
author | Max Kellermann <max@duempel.org> | 2014-12-17 18:45:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-17 19:10:58 +0100 |
commit | 81f17d10c8a817cd9f2b40608c7ccdf5d038ad8a (patch) | |
tree | 94500c773e70c3b527ec929f57c07c52fb0c7f2a | |
parent | a48704925d6c3e5c01057192403e55f3663b315c (diff) | |
download | mpd-81f17d10c8a817cd9f2b40608c7ccdf5d038ad8a.tar.gz mpd-81f17d10c8a817cd9f2b40608c7ccdf5d038ad8a.tar.xz mpd-81f17d10c8a817cd9f2b40608c7ccdf5d038ad8a.zip |
util/HugeAllocator: enable MEM_COMMIT on Windows
Without MEM_COMMIT, the reserved address space is not accessible, and
MPD crashes.
-rw-r--r-- | src/util/HugeAllocator.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
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 |