Chromium Code Reviews| Index: src/platform-linux.cc |
| diff --git a/src/platform-linux.cc b/src/platform-linux.cc |
| index 3416da3c230d930223fbd82f60fbc6d7721efa92..bb037ea88e7c283ee364247304a3e0055b6bbf25 100644 |
| --- a/src/platform-linux.cc |
| +++ b/src/platform-linux.cc |
| @@ -76,9 +76,6 @@ namespace v8 { |
| namespace internal { |
| -static Mutex* limit_mutex = NULL; |
| - |
| - |
| #ifdef __arm__ |
| bool OS::ArmUsingHardFloat() { |
| @@ -140,31 +137,6 @@ double OS::LocalTimeOffset() { |
| } |
| -// 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_guard(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; |
| -} |
| - |
| - |
| void* OS::Allocate(const size_t requested, |
| size_t* allocated, |
| bool is_executable) { |
| @@ -178,7 +150,6 @@ void* OS::Allocate(const size_t requested, |
| return NULL; |
| } |
| *allocated = msize; |
| - UpdateAllocatedSpaceLimits(mbase, msize); |
| return mbase; |
| } |
| @@ -472,7 +443,6 @@ bool VirtualMemory::CommitRegion(void* base, size_t size, bool is_executable) { |
| return false; |
| } |
| - UpdateAllocatedSpaceLimits(base, size); |
| return true; |
| } |
| @@ -501,12 +471,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() { |
|
Michael Starzinger
2013/09/04 15:49:25
AFAICT, this makes OS::TearDown empty on all platf
Benedikt Meurer
2013/09/05 08:06:46
Done.
|
| - delete limit_mutex; |
| } |