Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1911)

Unified Diff: Source/wtf/PageAllocator.cpp

Issue 23600014: Rename OS(UNIX) to OS(POSIX) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/FastMalloc.cpp ('k') | Source/wtf/PartitionAllocTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/PageAllocator.cpp
diff --git a/Source/wtf/PageAllocator.cpp b/Source/wtf/PageAllocator.cpp
index b7442f9bc7f57f1a861d2b5685fb9355074a15a0..35b24df67c7c92d33928df89a8717f34c26301fd 100644
--- a/Source/wtf/PageAllocator.cpp
+++ b/Source/wtf/PageAllocator.cpp
@@ -35,7 +35,7 @@
#include "wtf/CPU.h"
#include "wtf/CryptographicallyRandomNumber.h"
-#if OS(UNIX)
+#if OS(POSIX)
#include <sys/mman.h>
@@ -53,7 +53,7 @@
#else
#error Unknown OS
-#endif // OS(UNIX)
+#endif // OS(POSIX)
namespace WTF {
@@ -61,7 +61,7 @@ void* allocSuperPages(void* addr, size_t len)
{
ASSERT(!(len & kSuperPageOffsetMask));
ASSERT(!(reinterpret_cast<uintptr_t>(addr) & kSuperPageOffsetMask));
-#if OS(UNIX)
+#if OS(POSIX)
char* ptr = reinterpret_cast<char*>(mmap(addr, len, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0));
RELEASE_ASSERT(ptr != MAP_FAILED);
// If our requested address collided with another mapping, there's a
@@ -96,7 +96,7 @@ void* allocSuperPages(void* addr, size_t len)
if (!ret)
ret = VirtualAlloc(0, len, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
RELEASE_ASSERT(ret);
-#endif // OS(UNIX)
+#endif // OS(POSIX)
return ret;
}
@@ -104,7 +104,7 @@ void freeSuperPages(void* addr, size_t len)
{
ASSERT(!(reinterpret_cast<uintptr_t>(addr) & kSuperPageOffsetMask));
ASSERT(!(len & kSuperPageOffsetMask));
-#if OS(UNIX)
+#if OS(POSIX)
int ret = munmap(addr, len);
ASSERT(!ret);
#else
@@ -116,7 +116,7 @@ void freeSuperPages(void* addr, size_t len)
void setSystemPagesInaccessible(void* addr, size_t len)
{
ASSERT(!(len & kSystemPageOffsetMask));
-#if OS(UNIX)
+#if OS(POSIX)
int ret = mprotect(addr, len, PROT_NONE);
ASSERT(!ret);
#else
@@ -128,7 +128,7 @@ void setSystemPagesInaccessible(void* addr, size_t len)
void decommitSystemPages(void* addr, size_t len)
{
ASSERT(!(len & kSystemPageOffsetMask));
-#if OS(UNIX)
+#if OS(POSIX)
int ret = madvise(addr, len, MADV_FREE);
ASSERT(!ret);
#else
« no previous file with comments | « Source/wtf/FastMalloc.cpp ('k') | Source/wtf/PartitionAllocTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698