| Index: src/platform-macos.cc
|
| diff --git a/src/platform-macos.cc b/src/platform-macos.cc
|
| index d6d3128560f1f125ec197e60508a7ee9237dd25c..0e5e02bd2538e9bc05b36df336fae03b7b35dff6 100644
|
| --- a/src/platform-macos.cc
|
| +++ b/src/platform-macos.cc
|
| @@ -79,34 +79,6 @@ namespace v8 {
|
| namespace internal {
|
|
|
|
|
| -static Mutex* limit_mutex = NULL;
|
| -
|
| -
|
| -// We keep the lowest and highest addresses mapped as a quick way of
|
| -// determining that pointers are outside the heap (used mostly in assertions
|
| -// and verification). The estimate is conservative, i.e., not all addresses in
|
| -// 'allocated' space are actually allocated to our heap. The range is
|
| -// [lowest, highest), inclusive on the low and and exclusive on the high end.
|
| -static void* lowest_ever_allocated = reinterpret_cast<void*>(-1);
|
| -static void* highest_ever_allocated = reinterpret_cast<void*>(0);
|
| -
|
| -
|
| -static void UpdateAllocatedSpaceLimits(void* address, int size) {
|
| - ASSERT(limit_mutex != NULL);
|
| - LockGuard<Mutex> lock(limit_mutex);
|
| -
|
| - lowest_ever_allocated = Min(lowest_ever_allocated, address);
|
| - highest_ever_allocated =
|
| - Max(highest_ever_allocated,
|
| - reinterpret_cast<void*>(reinterpret_cast<char*>(address) + size));
|
| -}
|
| -
|
| -
|
| -bool OS::IsOutsideAllocatedSpace(void* address) {
|
| - return address < lowest_ever_allocated || address >= highest_ever_allocated;
|
| -}
|
| -
|
| -
|
| // Constants used for mmap.
|
| // kMmapFd is used to pass vm_alloc flags to tag the region with the user
|
| // defined tag 255 This helps identify V8-allocated regions in memory analysis
|
| @@ -131,7 +103,6 @@ void* OS::Allocate(const size_t requested,
|
| return NULL;
|
| }
|
| *allocated = msize;
|
| - UpdateAllocatedSpaceLimits(mbase, msize);
|
| return mbase;
|
| }
|
|
|
| @@ -366,8 +337,6 @@ bool VirtualMemory::CommitRegion(void* address,
|
| kMmapFdOffset)) {
|
| return false;
|
| }
|
| -
|
| - UpdateAllocatedSpaceLimits(address, size);
|
| return true;
|
| }
|
|
|
| @@ -396,12 +365,10 @@ void OS::SetUp() {
|
| // Seed the random number generator. We preserve microsecond resolution.
|
| uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()) ^ (getpid() << 16);
|
| srandom(static_cast<unsigned int>(seed));
|
| - limit_mutex = new Mutex();
|
| }
|
|
|
|
|
| void OS::TearDown() {
|
| - delete limit_mutex;
|
| }
|
|
|
|
|
|
|