OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Platform-specific code for Cygwin goes here. For the POSIX-compatible | 5 // Platform-specific code for Cygwin goes here. For the POSIX-compatible |
6 // parts, the implementation is in platform-posix.cc. | 6 // parts, the implementation is in platform-posix.cc. |
7 | 7 |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <pthread.h> | 9 #include <pthread.h> |
10 #include <semaphore.h> | 10 #include <semaphore.h> |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 | 185 |
186 VirtualMemory::~VirtualMemory() { | 186 VirtualMemory::~VirtualMemory() { |
187 if (IsReserved()) { | 187 if (IsReserved()) { |
188 bool result = ReleaseRegion(address_, size_); | 188 bool result = ReleaseRegion(address_, size_); |
189 DCHECK(result); | 189 DCHECK(result); |
190 USE(result); | 190 USE(result); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 | 194 bool VirtualMemory::IsReserved() const { return address_ != NULL; } |
195 bool VirtualMemory::IsReserved() { | |
196 return address_ != NULL; | |
197 } | |
198 | |
199 | 195 |
200 void VirtualMemory::Reset() { | 196 void VirtualMemory::Reset() { |
201 address_ = NULL; | 197 address_ = NULL; |
202 size_ = 0; | 198 size_ = 0; |
203 } | 199 } |
204 | 200 |
205 | 201 |
206 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { | 202 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { |
207 return CommitRegion(address, size, is_executable); | 203 return CommitRegion(address, size, is_executable); |
208 } | 204 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 } | 245 } |
250 | 246 |
251 | 247 |
252 bool VirtualMemory::HasLazyCommits() { | 248 bool VirtualMemory::HasLazyCommits() { |
253 // TODO(alph): implement for the platform. | 249 // TODO(alph): implement for the platform. |
254 return false; | 250 return false; |
255 } | 251 } |
256 | 252 |
257 } // namespace base | 253 } // namespace base |
258 } // namespace v8 | 254 } // namespace v8 |
OLD | NEW |