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

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

Issue 7352007: Add guard pages in front of platform allocations (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/platform-linux.cc ('k') | src/platform-nullos.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 void OS::Protect(void* address, size_t size) { 174 void OS::Protect(void* address, size_t size) {
175 UNIMPLEMENTED(); 175 UNIMPLEMENTED();
176 } 176 }
177 177
178 178
179 void OS::Unprotect(void* address, size_t size, bool is_executable) { 179 void OS::Unprotect(void* address, size_t size, bool is_executable) {
180 UNIMPLEMENTED(); 180 UNIMPLEMENTED();
181 } 181 }
182 182
183 #endif 183 void OS::Guard(void* address, const size_t size) {
184 mprotect(address, size, PROT_NONE);
185 }
186
187 #endif // ENABLE_HEAP_PROTECTION
184 188
185 189
186 void OS::Sleep(int milliseconds) { 190 void OS::Sleep(int milliseconds) {
187 usleep(1000 * milliseconds); 191 usleep(1000 * milliseconds);
188 } 192 }
189 193
190 194
191 void OS::Abort() { 195 void OS::Abort() {
192 // Redirect to std abort to signal abnormal program termination 196 // Redirect to std abort to signal abnormal program termination
193 abort(); 197 abort();
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 821
818 void Sampler::Stop() { 822 void Sampler::Stop() {
819 ASSERT(IsActive()); 823 ASSERT(IsActive());
820 SamplerThread::RemoveActiveSampler(this); 824 SamplerThread::RemoveActiveSampler(this);
821 SetActive(false); 825 SetActive(false);
822 } 826 }
823 827
824 #endif // ENABLE_LOGGING_AND_PROFILING 828 #endif // ENABLE_LOGGING_AND_PROFILING
825 829
826 } } // namespace v8::internal 830 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-linux.cc ('k') | src/platform-nullos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698