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

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

Issue 9584047: Fix MinGW64 build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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/globals.h ('k') | 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 // 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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 878
879 return base; 879 return base;
880 } 880 }
881 881
882 882
883 void* OS::Allocate(const size_t requested, 883 void* OS::Allocate(const size_t requested,
884 size_t* allocated, 884 size_t* allocated,
885 bool is_executable) { 885 bool is_executable) {
886 // VirtualAlloc rounds allocated size to page size automatically. 886 // VirtualAlloc rounds allocated size to page size automatically.
887 size_t msize = RoundUp(requested, static_cast<int>(GetPageSize())); 887 size_t msize = RoundUp(requested, static_cast<int>(GetPageSize()));
888 void* address = 0;
889 888
890 // Windows XP SP2 allows Data Excution Prevention (DEP). 889 // Windows XP SP2 allows Data Excution Prevention (DEP).
891 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; 890 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
892 891
893 LPVOID mbase = RandomizedVirtualAlloc(msize, 892 LPVOID mbase = RandomizedVirtualAlloc(msize,
894 MEM_COMMIT | MEM_RESERVE, 893 MEM_COMMIT | MEM_RESERVE,
895 prot); 894 prot);
896 895
897 if (mbase == NULL) { 896 if (mbase == NULL) {
898 LOG(ISOLATE, StringEvent("OS::Allocate", "VirtualAlloc failed")); 897 LOG(ISOLATE, StringEvent("OS::Allocate", "VirtualAlloc failed"));
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2069 2068
2070 2069
2071 void Sampler::Stop() { 2070 void Sampler::Stop() {
2072 ASSERT(IsActive()); 2071 ASSERT(IsActive());
2073 SamplerThread::RemoveActiveSampler(this); 2072 SamplerThread::RemoveActiveSampler(this);
2074 SetActive(false); 2073 SetActive(false);
2075 } 2074 }
2076 2075
2077 2076
2078 } } // namespace v8::internal 2077 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698