OLD | NEW |
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 // Assign memory as a guard page so that access will cause an exception. | 248 // Assign memory as a guard page so that access will cause an exception. |
249 static void Guard(void* address, const size_t size); | 249 static void Guard(void* address, const size_t size); |
250 | 250 |
251 // Generate a random address to be used for hinting mmap(). | 251 // Generate a random address to be used for hinting mmap(). |
252 static void* GetRandomMmapAddr(); | 252 static void* GetRandomMmapAddr(); |
253 | 253 |
254 // Get the Alignment guaranteed by Allocate(). | 254 // Get the Alignment guaranteed by Allocate(). |
255 static size_t AllocateAlignment(); | 255 static size_t AllocateAlignment(); |
256 | 256 |
257 // Returns an indication of whether a pointer is in a space that | |
258 // has been allocated by Allocate(). This method may conservatively | |
259 // always return false, but giving more accurate information may | |
260 // improve the robustness of the stack dump code in the presence of | |
261 // heap corruption. | |
262 static bool IsOutsideAllocatedSpace(void* pointer); | |
263 | |
264 // Sleep for a number of milliseconds. | 257 // Sleep for a number of milliseconds. |
265 static void Sleep(const int milliseconds); | 258 static void Sleep(const int milliseconds); |
266 | 259 |
267 // Abort the current process. | 260 // Abort the current process. |
268 static void Abort(); | 261 static void Abort(); |
269 | 262 |
270 // Debug break. | 263 // Debug break. |
271 static void DebugBreak(); | 264 static void DebugBreak(); |
272 | 265 |
273 // Dump C++ current stack trace (only functional on Linux). | 266 // Dump C++ current stack trace (only functional on Linux). |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 char name_[kMaxThreadNameLength]; | 601 char name_[kMaxThreadNameLength]; |
609 int stack_size_; | 602 int stack_size_; |
610 Semaphore* start_semaphore_; | 603 Semaphore* start_semaphore_; |
611 | 604 |
612 DISALLOW_COPY_AND_ASSIGN(Thread); | 605 DISALLOW_COPY_AND_ASSIGN(Thread); |
613 }; | 606 }; |
614 | 607 |
615 } } // namespace v8::internal | 608 } } // namespace v8::internal |
616 | 609 |
617 #endif // V8_PLATFORM_H_ | 610 #endif // V8_PLATFORM_H_ |
OLD | NEW |