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

Side by Side Diff: src/platform.h

Issue 23903008: Drop OS::IsOutsideAllocatedSpace() and move the tracking to the MemoryAllocator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/platform-cygwin.cc » ('j') | src/platform-linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698