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

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

Issue 9535013: Merge r10809 from the bleeding_edge to the 3.8 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.8/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/platform-solaris.cc ('k') | src/serialize.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; 1479 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
1480 if (NULL == VirtualAlloc(base, size, MEM_COMMIT, prot)) { 1480 if (NULL == VirtualAlloc(base, size, MEM_COMMIT, prot)) {
1481 return false; 1481 return false;
1482 } 1482 }
1483 1483
1484 UpdateAllocatedSpaceLimits(base, static_cast<int>(size)); 1484 UpdateAllocatedSpaceLimits(base, static_cast<int>(size));
1485 return true; 1485 return true;
1486 } 1486 }
1487 1487
1488 1488
1489 bool VirtualMemory::Guard(void* address) {
1490 if (NULL == VirtualAlloc(address,
1491 OS::CommitPageSize(),
1492 MEM_COMMIT,
1493 PAGE_READONLY | PAGE_GUARD)) {
1494 return false;
1495 }
1496 return true;
1497 }
1498
1499
1489 bool VirtualMemory::UncommitRegion(void* base, size_t size) { 1500 bool VirtualMemory::UncommitRegion(void* base, size_t size) {
1490 return VirtualFree(base, size, MEM_DECOMMIT) != 0; 1501 return VirtualFree(base, size, MEM_DECOMMIT) != 0;
1491 } 1502 }
1492 1503
1493 1504
1494 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 1505 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
1495 return VirtualFree(base, 0, MEM_RELEASE) != 0; 1506 return VirtualFree(base, 0, MEM_RELEASE) != 0;
1496 } 1507 }
1497 1508
1498 1509
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 2045
2035 2046
2036 void Sampler::Stop() { 2047 void Sampler::Stop() {
2037 ASSERT(IsActive()); 2048 ASSERT(IsActive());
2038 SamplerThread::RemoveActiveSampler(this); 2049 SamplerThread::RemoveActiveSampler(this);
2039 SetActive(false); 2050 SetActive(false);
2040 } 2051 }
2041 2052
2042 2053
2043 } } // namespace v8::internal 2054 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-solaris.cc ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698