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 FreeBSD goes here. For the POSIX-compatible | 5 // Platform-specific code for FreeBSD 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 <pthread.h> | 8 #include <pthread.h> |
9 #include <semaphore.h> | 9 #include <semaphore.h> |
10 #include <signal.h> | 10 #include <signal.h> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 | 175 |
176 VirtualMemory::~VirtualMemory() { | 176 VirtualMemory::~VirtualMemory() { |
177 if (IsReserved()) { | 177 if (IsReserved()) { |
178 bool result = ReleaseRegion(address(), size()); | 178 bool result = ReleaseRegion(address(), size()); |
179 DCHECK(result); | 179 DCHECK(result); |
180 USE(result); | 180 USE(result); |
181 } | 181 } |
182 } | 182 } |
183 | 183 |
184 | 184 bool VirtualMemory::IsReserved() const { return address_ != NULL; } |
185 bool VirtualMemory::IsReserved() { | |
186 return address_ != NULL; | |
187 } | |
188 | |
189 | 185 |
190 void VirtualMemory::Reset() { | 186 void VirtualMemory::Reset() { |
191 address_ = NULL; | 187 address_ = NULL; |
192 size_ = 0; | 188 size_ = 0; |
193 } | 189 } |
194 | 190 |
195 | 191 |
196 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { | 192 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { |
197 return CommitRegion(address, size, is_executable); | 193 return CommitRegion(address, size, is_executable); |
198 } | 194 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 } | 252 } |
257 | 253 |
258 | 254 |
259 bool VirtualMemory::HasLazyCommits() { | 255 bool VirtualMemory::HasLazyCommits() { |
260 // TODO(alph): implement for the platform. | 256 // TODO(alph): implement for the platform. |
261 return false; | 257 return false; |
262 } | 258 } |
263 | 259 |
264 } // namespace base | 260 } // namespace base |
265 } // namespace v8 | 261 } // namespace v8 |
OLD | NEW |