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

Side by Side Diff: src/base/platform/platform-win32.cc

Issue 2101383002: [heap] Reland uncommit unused large object page memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/base/platform/platform-macos.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
1293 1297
1294 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 1298 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
1295 return VirtualFree(base, 0, MEM_RELEASE) != 0; 1299 return VirtualFree(base, 0, MEM_RELEASE) != 0;
1296 } 1300 }
1297 1301
1298 1302
1299 bool VirtualMemory::HasLazyCommits() { 1303 bool VirtualMemory::HasLazyCommits() {
1300 // TODO(alph): implement for the platform. 1304 // TODO(alph): implement for the platform.
1301 return false; 1305 return false;
1302 } 1306 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 1397
1394 1398
1395 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 1399 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
1396 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); 1400 BOOL result = TlsSetValue(static_cast<DWORD>(key), value);
1397 USE(result); 1401 USE(result);
1398 DCHECK(result); 1402 DCHECK(result);
1399 } 1403 }
1400 1404
1401 } // namespace base 1405 } // namespace base
1402 } // namespace v8 1406 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/platform/platform-macos.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698