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

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

Issue 550063002: Fix windows build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 779
780 // Windows XP SP2 allows Data Excution Prevention (DEP). 780 // Windows XP SP2 allows Data Excution Prevention (DEP).
781 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; 781 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
782 782
783 LPVOID mbase = RandomizedVirtualAlloc(msize, 783 LPVOID mbase = RandomizedVirtualAlloc(msize,
784 MEM_COMMIT | MEM_RESERVE, 784 MEM_COMMIT | MEM_RESERVE,
785 prot); 785 prot);
786 786
787 if (mbase == NULL) return NULL; 787 if (mbase == NULL) return NULL;
788 788
789 DCHECK((static_cast<uintptr_t>(mbase) % OS::AllocateAlignment()) == 0); 789 DCHECK((reinterpret_cast<uintptr_t>(mbase) % OS::AllocateAlignment()) == 0);
790 790
791 *allocated = msize; 791 *allocated = msize;
792 return mbase; 792 return mbase;
793 } 793 }
794 794
795 795
796 void OS::Free(void* address, const size_t size) { 796 void OS::Free(void* address, const size_t size) {
797 // TODO(1240712): VirtualFree has a return value which is ignored here. 797 // TODO(1240712): VirtualFree has a return value which is ignored here.
798 VirtualFree(address, 0, MEM_RELEASE); 798 VirtualFree(address, 0, MEM_RELEASE);
799 USE(size); 799 USE(size);
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 DCHECK(result); 1397 DCHECK(result);
1398 } 1398 }
1399 1399
1400 1400
1401 1401
1402 void Thread::YieldCPU() { 1402 void Thread::YieldCPU() {
1403 Sleep(0); 1403 Sleep(0);
1404 } 1404 }
1405 1405
1406 } } // namespace v8::base 1406 } } // namespace v8::base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698