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

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

Issue 2299753002: Made zone segments aligned in memory and included a pointer to the zone in the header. Larger objec…
Patch Set: Added a zone segment pool for small segments to avoid frequent sys calls Created 4 years, 3 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-solaris.cc ('k') | src/list.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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 1230
1231 1231
1232 VirtualMemory::~VirtualMemory() { 1232 VirtualMemory::~VirtualMemory() {
1233 if (IsReserved()) { 1233 if (IsReserved()) {
1234 bool result = ReleaseRegion(address(), size()); 1234 bool result = ReleaseRegion(address(), size());
1235 DCHECK(result); 1235 DCHECK(result);
1236 USE(result); 1236 USE(result);
1237 } 1237 }
1238 } 1238 }
1239 1239
1240 1240 bool VirtualMemory::IsReserved() const { return address_ != NULL; }
1241 bool VirtualMemory::IsReserved() {
1242 return address_ != NULL;
1243 }
1244
1245 1241
1246 void VirtualMemory::Reset() { 1242 void VirtualMemory::Reset() {
1247 address_ = NULL; 1243 address_ = NULL;
1248 size_ = 0; 1244 size_ = 0;
1249 } 1245 }
1250 1246
1251 1247
1252 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { 1248 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) {
1253 return CommitRegion(address, size, is_executable); 1249 return CommitRegion(address, size, is_executable);
1254 } 1250 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 1392
1397 1393
1398 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 1394 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
1399 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); 1395 BOOL result = TlsSetValue(static_cast<DWORD>(key), value);
1400 USE(result); 1396 USE(result);
1401 DCHECK(result); 1397 DCHECK(result);
1402 } 1398 }
1403 1399
1404 } // namespace base 1400 } // namespace base
1405 } // namespace v8 1401 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/platform/platform-solaris.cc ('k') | src/list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698