diff options
Diffstat (limited to 'src/3rdparty/masm/wtf/OSAllocatorPosix.cpp')
-rw-r--r-- | src/3rdparty/masm/wtf/OSAllocatorPosix.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp index 27ef02805d..7b2a55c6b6 100644 --- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp +++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp @@ -26,16 +26,14 @@ #include "config.h" #include "OSAllocator.h" +#if OS(UNIX) + #include "PageAllocation.h" #include <errno.h> #include <sys/mman.h> #include <wtf/Assertions.h> #include <wtf/UnusedParam.h> -#if (OS(DARWIN) && CPU(X86_64)) -#include <stdlib.h> -#endif - namespace WTF { void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable, bool includesGuardPages) @@ -46,6 +44,11 @@ void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, if (result == MAP_FAILED) CRASH(); #elif OS(LINUX) + UNUSED_PARAM(usage); + UNUSED_PARAM(writable); + UNUSED_PARAM(executable); + UNUSED_PARAM(includesGuardPages); + void* result = mmap(0, bytes, PROT_NONE, MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1, 0); if (result == MAP_FAILED) CRASH(); @@ -186,3 +189,5 @@ void OSAllocator::releaseDecommitted(void* address, size_t bytes) } } // namespace WTF + +#endif // OS(UNIX) |