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

Side by Side Diff: src/base/platform/platform.h

Issue 768543002: [WIP] TrapHandler 2014/11/27. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/api.cc ('k') | src/base/platform/platform-posix.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 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 // This module contains the platform-specific code. This make the rest of the 5 // This module contains the platform-specific code. This make the rest of the
6 // code less dependent on operating system, compilers and runtime libraries. 6 // code less dependent on operating system, compilers and runtime libraries.
7 // This module does specifically not deal with differences between different 7 // This module does specifically not deal with differences between different
8 // processor architecture. 8 // processor architecture.
9 // The platform classes have the same definition for all platforms. The 9 // The platform classes have the same definition for all platforms. The
10 // implementation for a particular platform is put in platform_<os>.cc. 10 // implementation for a particular platform is put in platform_<os>.cc.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 static void Free(void* address, const size_t size); 173 static void Free(void* address, const size_t size);
174 174
175 // This is the granularity at which the ProtectCode(...) call can set page 175 // This is the granularity at which the ProtectCode(...) call can set page
176 // permissions. 176 // permissions.
177 static intptr_t CommitPageSize(); 177 static intptr_t CommitPageSize();
178 178
179 // Mark code segments non-writable. 179 // Mark code segments non-writable.
180 static void ProtectCode(void* address, const size_t size); 180 static void ProtectCode(void* address, const size_t size);
181 181
182 // Assign memory as a guard page so that access will cause an exception. 182 // Assign memory as a guard page so that access will cause an exception.
183 static void Guard(void* address, const size_t size); 183 static void Guard(void* const address, size_t const size);
184 static void Unguard(void* const address, size_t const size);
184 185
185 // Generate a random address to be used for hinting mmap(). 186 // Generate a random address to be used for hinting mmap().
186 static void* GetRandomMmapAddr(); 187 static void* GetRandomMmapAddr();
187 188
188 // Get the Alignment guaranteed by Allocate(). 189 // Get the Alignment guaranteed by Allocate().
189 static size_t AllocateAlignment(); 190 static size_t AllocateAlignment();
190 191
191 // Sleep for a number of milliseconds. 192 // Sleep for a number of milliseconds.
192 static void Sleep(const int milliseconds); 193 static void Sleep(const int milliseconds);
193 194
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 char name_[kMaxThreadNameLength]; 470 char name_[kMaxThreadNameLength];
470 int stack_size_; 471 int stack_size_;
471 Semaphore* start_semaphore_; 472 Semaphore* start_semaphore_;
472 473
473 DISALLOW_COPY_AND_ASSIGN(Thread); 474 DISALLOW_COPY_AND_ASSIGN(Thread);
474 }; 475 };
475 476
476 } } // namespace v8::base 477 } } // namespace v8::base
477 478
478 #endif // V8_BASE_PLATFORM_PLATFORM_H_ 479 #endif // V8_BASE_PLATFORM_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/base/platform/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698