Index: src/platform-macos.cc |
=================================================================== |
--- src/platform-macos.cc (revision 3427) |
+++ src/platform-macos.cc (working copy) |
@@ -105,8 +105,10 @@ |
static void* lowest_ever_allocated = reinterpret_cast<void*>(-1); |
static void* highest_ever_allocated = reinterpret_cast<void*>(0); |
+static MutexLockAdapter heap_limits_lock(OS::CreateMutex()); |
static void UpdateAllocatedSpaceLimits(void* address, int size) { |
+ V8SharedStateLocker heap_limits_locker(&heap_limits_lock); |
lowest_ever_allocated = Min(lowest_ever_allocated, address); |
highest_ever_allocated = |
Max(highest_ever_allocated, |
@@ -115,6 +117,7 @@ |
bool OS::IsOutsideAllocatedSpace(void* address) { |
+ V8SharedStateLocker heap_limits_locker(&heap_limits_lock); |
return address < lowest_ever_allocated || address >= highest_ever_allocated; |
} |