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 Win32. | 5 // Platform-specific code for Win32. |
6 | 6 |
7 // Secure API functions are not available using MinGW with msvcrt.dll | 7 // Secure API functions are not available using MinGW with msvcrt.dll |
8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to | 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to |
9 // disable definition of secure API functions in standard headers that | 9 // disable definition of secure API functions in standard headers that |
10 // would conflict with our own implementation. | 10 // would conflict with our own implementation. |
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 return false; | 1283 return false; |
1284 } | 1284 } |
1285 return true; | 1285 return true; |
1286 } | 1286 } |
1287 | 1287 |
1288 | 1288 |
1289 bool VirtualMemory::UncommitRegion(void* base, size_t size) { | 1289 bool VirtualMemory::UncommitRegion(void* base, size_t size) { |
1290 return VirtualFree(base, size, MEM_DECOMMIT) != 0; | 1290 return VirtualFree(base, size, MEM_DECOMMIT) != 0; |
1291 } | 1291 } |
1292 | 1292 |
1293 bool VirtualMemory::ReleasePartialRegion(void* base, size_t size, | |
1294 void* free_start, size_t free_size) { | |
1295 return VirtualFree(free_start, free_size, MEM_DECOMMIT) != 0; | |
1296 } | |
1297 | 1293 |
1298 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { | 1294 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { |
1299 return VirtualFree(base, 0, MEM_RELEASE) != 0; | 1295 return VirtualFree(base, 0, MEM_RELEASE) != 0; |
1300 } | 1296 } |
1301 | 1297 |
1302 | 1298 |
1303 bool VirtualMemory::HasLazyCommits() { | 1299 bool VirtualMemory::HasLazyCommits() { |
1304 // TODO(alph): implement for the platform. | 1300 // TODO(alph): implement for the platform. |
1305 return false; | 1301 return false; |
1306 } | 1302 } |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1397 | 1393 |
1398 | 1394 |
1399 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 1395 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
1400 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); | 1396 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); |
1401 USE(result); | 1397 USE(result); |
1402 DCHECK(result); | 1398 DCHECK(result); |
1403 } | 1399 } |
1404 | 1400 |
1405 } // namespace base | 1401 } // namespace base |
1406 } // namespace v8 | 1402 } // namespace v8 |
OLD | NEW |