Index: src/platform-macos.cc |
diff --git a/src/platform-macos.cc b/src/platform-macos.cc |
index 898c93f39a346003ae53724cc290df362c12d5ed..8327acfb5f13170d7098233d4ed0aebc596ed157 100644 |
--- a/src/platform-macos.cc |
+++ b/src/platform-macos.cc |
@@ -408,12 +408,33 @@ VirtualMemory::~VirtualMemory() { |
} |
+bool VirtualMemory::IsReserved() { |
+ return address_ != NULL; |
+} |
+ |
+ |
void VirtualMemory::Reset() { |
address_ = NULL; |
size_ = 0; |
} |
+bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { |
+ return CommitRegion(address, size, is_executable); |
+} |
+ |
+ |
+bool VirtualMemory::Uncommit(void* address, size_t size) { |
+ return UncommitRegion(address, size); |
+} |
+ |
+ |
+bool VirtualMemory::Guard(void* address) { |
+ OS::Guard(address, OS::CommitPageSize()); |
+ return true; |
+} |
+ |
+ |
void* VirtualMemory::ReserveRegion(size_t size) { |
void* result = mmap(OS::GetRandomMmapAddr(), |
size, |
@@ -428,22 +449,6 @@ void* VirtualMemory::ReserveRegion(size_t size) { |
} |
-bool VirtualMemory::IsReserved() { |
- return address_ != NULL; |
-} |
- |
- |
-bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { |
- return CommitRegion(address, size, is_executable); |
-} |
- |
- |
-bool VirtualMemory::Guard(void* address) { |
- OS::Guard(address, OS::CommitPageSize()); |
- return true; |
-} |
- |
- |
bool VirtualMemory::CommitRegion(void* address, |
size_t size, |
bool is_executable) { |
@@ -462,11 +467,6 @@ bool VirtualMemory::CommitRegion(void* address, |
} |
-bool VirtualMemory::Uncommit(void* address, size_t size) { |
- return UncommitRegion(address, size); |
-} |
- |
- |
bool VirtualMemory::UncommitRegion(void* address, size_t size) { |
return mmap(address, |
size, |