Title: [230308] trunk/Source/bmalloc
Revision
230308
Author
utatane....@gmail.com
Date
2018-04-05 11:07:28 -0700 (Thu, 05 Apr 2018)

Log Message

bmalloc StaticMutex's constructor should be constexpr
https://bugs.webkit.org/show_bug.cgi?id=180600

Reviewed by Mark Lam.

StaticMutex and Mutex can be unified. This patch changes std::atomic_flag in StaticMutex
to std::atomic<bool> to add constexpr constructor to StaticMutex. Then, StaticMutex can
be initialized in static storage without calling any static initializers.
And we also rename StaticMutex to Mutex simply.

* CMakeLists.txt:
* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/AllIsoHeaps.cpp:
(bmalloc::AllIsoHeaps::AllIsoHeaps):
* bmalloc/AllIsoHeaps.h:
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::tryAllocate):
(bmalloc::Allocator::allocateImpl):
(bmalloc::Allocator::reallocate):
(bmalloc::Allocator::refillAllocatorSlowCase):
(bmalloc::Allocator::allocateLarge):
* bmalloc/CryptoRandom.cpp:
(bmalloc::ARC4RandomNumberGenerator::ARC4RandomNumberGenerator):
* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSlowCase):
* bmalloc/Deallocator.h:
(bmalloc::Deallocator::lineCache):
* bmalloc/DebugHeap.cpp:
(bmalloc::DebugHeap::DebugHeap):
* bmalloc/DebugHeap.h:
* bmalloc/Environment.cpp:
(bmalloc::Environment::Environment):
* bmalloc/Environment.h:
* bmalloc/Gigacage.cpp:
(Gigacage::disablePrimitiveGigacage):
(Gigacage::addPrimitiveDisableCallback):
(Gigacage::removePrimitiveDisableCallback):
* bmalloc/Heap.cpp:
(bmalloc::Heap::Heap):
(bmalloc::Heap::freeableMemory):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::deallocateLineCache):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::deallocateSmallLine):
(bmalloc::Heap::allocateSmallBumpRangesByMetadata):
(bmalloc::Heap::allocateSmallBumpRangesByObject):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::tryAllocateLarge):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::isLarge):
(bmalloc::Heap::largeSize):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
(bmalloc::Heap::externalCommit):
(bmalloc::Heap::externalDecommit):
* bmalloc/Heap.h:
(bmalloc::Heap::mutex):
(bmalloc::Heap::allocateSmallBumpRanges):
(bmalloc::Heap::derefSmallLine):
* bmalloc/IsoDeallocator.h:
* bmalloc/IsoHeap.h:
* bmalloc/IsoTLSDeallocatorEntry.h:
* bmalloc/IsoTLSDeallocatorEntryInlines.h:
(bmalloc::IsoTLSDeallocatorEntry<Config>::IsoTLSDeallocatorEntry):
* bmalloc/IsoTLSInlines.h:
(bmalloc::IsoTLS::ensureHeap):
* bmalloc/IsoTLSLayout.cpp:
(bmalloc::IsoTLSLayout::IsoTLSLayout):
(bmalloc::IsoTLSLayout::add):
* bmalloc/IsoTLSLayout.h:
* bmalloc/Mutex.cpp: Renamed from Source/bmalloc/bmalloc/StaticMutex.cpp.
(bmalloc::Mutex::lockSlowCase):
* bmalloc/Mutex.h:
(bmalloc::sleep):
(bmalloc::waitUntilFalse):
(bmalloc::Mutex::try_lock):
(bmalloc::Mutex::lock):
(bmalloc::Mutex::unlock):
(bmalloc::Mutex::Mutex): Deleted.
* bmalloc/ObjectType.cpp:
(bmalloc::objectType):
* bmalloc/PerProcess.cpp:
(bmalloc::getPerProcessData):
* bmalloc/PerProcess.h:
(bmalloc::PerProcess::mutex):
(bmalloc::PerProcess::getSlowCase):
* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::freeableMemory):
* bmalloc/Scavenger.h:
* bmalloc/SmallLine.h:
(bmalloc::SmallLine::refCount):
(bmalloc::SmallLine::ref):
(bmalloc::SmallLine::deref):
* bmalloc/SmallPage.h:
(bmalloc::SmallPage::refCount):
(bmalloc::SmallPage::hasFreeLines const):
(bmalloc::SmallPage::setHasFreeLines):
(bmalloc::SmallPage::ref):
(bmalloc::SmallPage::deref):
* bmalloc/StaticMutex.h: Removed.
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::VMHeap):
* bmalloc/VMHeap.h:
* bmalloc/Zone.cpp:
(bmalloc::Zone::Zone):
* bmalloc/Zone.h:
* bmalloc/bmalloc.cpp:
(bmalloc::api::tryLargeZeroedMemalignVirtual):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::isEnabled):
(bmalloc::api::setScavengerThreadQOSClass):
* bmalloc/bmalloc.h:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/bmalloc/CMakeLists.txt (230307 => 230308)


--- trunk/Source/bmalloc/CMakeLists.txt	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/CMakeLists.txt	2018-04-05 18:07:28 UTC (rev 230308)
@@ -24,10 +24,10 @@
     bmalloc/IsoTLSLayout.cpp
     bmalloc/LargeMap.cpp
     bmalloc/Logging.cpp
+    bmalloc/Mutex.cpp
     bmalloc/ObjectType.cpp
     bmalloc/PerProcess.cpp
     bmalloc/Scavenger.cpp
-    bmalloc/StaticMutex.cpp
     bmalloc/VMHeap.cpp
     bmalloc/bmalloc.cpp
     bmalloc/mbmalloc.cpp

Modified: trunk/Source/bmalloc/ChangeLog (230307 => 230308)


--- trunk/Source/bmalloc/ChangeLog	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/ChangeLog	2018-04-05 18:07:28 UTC (rev 230308)
@@ -1,3 +1,123 @@
+2018-04-05  Yusuke Suzuki  <utatane....@gmail.com>
+
+        bmalloc StaticMutex's constructor should be constexpr
+        https://bugs.webkit.org/show_bug.cgi?id=180600
+
+        Reviewed by Mark Lam.
+
+        StaticMutex and Mutex can be unified. This patch changes std::atomic_flag in StaticMutex
+        to std::atomic<bool> to add constexpr constructor to StaticMutex. Then, StaticMutex can
+        be initialized in static storage without calling any static initializers.
+        And we also rename StaticMutex to Mutex simply.
+
+        * CMakeLists.txt:
+        * bmalloc.xcodeproj/project.pbxproj:
+        * bmalloc/AllIsoHeaps.cpp:
+        (bmalloc::AllIsoHeaps::AllIsoHeaps):
+        * bmalloc/AllIsoHeaps.h:
+        * bmalloc/Allocator.cpp:
+        (bmalloc::Allocator::tryAllocate):
+        (bmalloc::Allocator::allocateImpl):
+        (bmalloc::Allocator::reallocate):
+        (bmalloc::Allocator::refillAllocatorSlowCase):
+        (bmalloc::Allocator::allocateLarge):
+        * bmalloc/CryptoRandom.cpp:
+        (bmalloc::ARC4RandomNumberGenerator::ARC4RandomNumberGenerator):
+        * bmalloc/Deallocator.cpp:
+        (bmalloc::Deallocator::scavenge):
+        (bmalloc::Deallocator::processObjectLog):
+        (bmalloc::Deallocator::deallocateSlowCase):
+        * bmalloc/Deallocator.h:
+        (bmalloc::Deallocator::lineCache):
+        * bmalloc/DebugHeap.cpp:
+        (bmalloc::DebugHeap::DebugHeap):
+        * bmalloc/DebugHeap.h:
+        * bmalloc/Environment.cpp:
+        (bmalloc::Environment::Environment):
+        * bmalloc/Environment.h:
+        * bmalloc/Gigacage.cpp:
+        (Gigacage::disablePrimitiveGigacage):
+        (Gigacage::addPrimitiveDisableCallback):
+        (Gigacage::removePrimitiveDisableCallback):
+        * bmalloc/Heap.cpp:
+        (bmalloc::Heap::Heap):
+        (bmalloc::Heap::freeableMemory):
+        (bmalloc::Heap::scavenge):
+        (bmalloc::Heap::deallocateLineCache):
+        (bmalloc::Heap::allocateSmallChunk):
+        (bmalloc::Heap::allocateSmallPage):
+        (bmalloc::Heap::deallocateSmallLine):
+        (bmalloc::Heap::allocateSmallBumpRangesByMetadata):
+        (bmalloc::Heap::allocateSmallBumpRangesByObject):
+        (bmalloc::Heap::splitAndAllocate):
+        (bmalloc::Heap::tryAllocateLarge):
+        (bmalloc::Heap::allocateLarge):
+        (bmalloc::Heap::isLarge):
+        (bmalloc::Heap::largeSize):
+        (bmalloc::Heap::shrinkLarge):
+        (bmalloc::Heap::deallocateLarge):
+        (bmalloc::Heap::externalCommit):
+        (bmalloc::Heap::externalDecommit):
+        * bmalloc/Heap.h:
+        (bmalloc::Heap::mutex):
+        (bmalloc::Heap::allocateSmallBumpRanges):
+        (bmalloc::Heap::derefSmallLine):
+        * bmalloc/IsoDeallocator.h:
+        * bmalloc/IsoHeap.h:
+        * bmalloc/IsoTLSDeallocatorEntry.h:
+        * bmalloc/IsoTLSDeallocatorEntryInlines.h:
+        (bmalloc::IsoTLSDeallocatorEntry<Config>::IsoTLSDeallocatorEntry):
+        * bmalloc/IsoTLSInlines.h:
+        (bmalloc::IsoTLS::ensureHeap):
+        * bmalloc/IsoTLSLayout.cpp:
+        (bmalloc::IsoTLSLayout::IsoTLSLayout):
+        (bmalloc::IsoTLSLayout::add):
+        * bmalloc/IsoTLSLayout.h:
+        * bmalloc/Mutex.cpp: Renamed from Source/bmalloc/bmalloc/StaticMutex.cpp.
+        (bmalloc::Mutex::lockSlowCase):
+        * bmalloc/Mutex.h:
+        (bmalloc::sleep):
+        (bmalloc::waitUntilFalse):
+        (bmalloc::Mutex::try_lock):
+        (bmalloc::Mutex::lock):
+        (bmalloc::Mutex::unlock):
+        (bmalloc::Mutex::Mutex): Deleted.
+        * bmalloc/ObjectType.cpp:
+        (bmalloc::objectType):
+        * bmalloc/PerProcess.cpp:
+        (bmalloc::getPerProcessData):
+        * bmalloc/PerProcess.h:
+        (bmalloc::PerProcess::mutex):
+        (bmalloc::PerProcess::getSlowCase):
+        * bmalloc/Scavenger.cpp:
+        (bmalloc::Scavenger::Scavenger):
+        (bmalloc::Scavenger::scavenge):
+        (bmalloc::Scavenger::freeableMemory):
+        * bmalloc/Scavenger.h:
+        * bmalloc/SmallLine.h:
+        (bmalloc::SmallLine::refCount):
+        (bmalloc::SmallLine::ref):
+        (bmalloc::SmallLine::deref):
+        * bmalloc/SmallPage.h:
+        (bmalloc::SmallPage::refCount):
+        (bmalloc::SmallPage::hasFreeLines const):
+        (bmalloc::SmallPage::setHasFreeLines):
+        (bmalloc::SmallPage::ref):
+        (bmalloc::SmallPage::deref):
+        * bmalloc/StaticMutex.h: Removed.
+        * bmalloc/VMHeap.cpp:
+        (bmalloc::VMHeap::VMHeap):
+        * bmalloc/VMHeap.h:
+        * bmalloc/Zone.cpp:
+        (bmalloc::Zone::Zone):
+        * bmalloc/Zone.h:
+        * bmalloc/bmalloc.cpp:
+        (bmalloc::api::tryLargeZeroedMemalignVirtual):
+        (bmalloc::api::freeLargeVirtual):
+        (bmalloc::api::isEnabled):
+        (bmalloc::api::setScavengerThreadQOSClass):
+        * bmalloc/bmalloc.h:
+
 2018-04-04  Konstantin Tokarev  <annu...@yandex.ru>
 
         Enable Gigacage unconditionally when building JSCOnly on macOS (build fix)

Modified: trunk/Source/bmalloc/bmalloc/AllIsoHeaps.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/AllIsoHeaps.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/AllIsoHeaps.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -27,7 +27,7 @@
 
 namespace bmalloc {
 
-AllIsoHeaps::AllIsoHeaps(const std::lock_guard<StaticMutex>&)
+AllIsoHeaps::AllIsoHeaps(const std::lock_guard<Mutex>&)
 {
 }
 

Modified: trunk/Source/bmalloc/bmalloc/AllIsoHeaps.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/AllIsoHeaps.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/AllIsoHeaps.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -32,7 +32,7 @@
 
 class AllIsoHeaps {
 public:
-    AllIsoHeaps(const std::lock_guard<StaticMutex>&);
+    AllIsoHeaps(const std::lock_guard<Mutex>&);
     
     void add(IsoHeapImplBase*);
     IsoHeapImplBase* head();

Modified: trunk/Source/bmalloc/bmalloc/Allocator.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Allocator.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Allocator.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -60,7 +60,7 @@
     if (size <= smallMax)
         return allocate(size);
 
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
     return m_heap.tryAllocateLarge(lock, alignment, size);
 }
 
@@ -89,7 +89,7 @@
     if (size <= smallMax && alignment <= smallMax)
         return allocate(roundUpToMultipleOf(alignment, size));
 
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
     if (crashOnFailure)
         return m_heap.allocateLarge(lock, alignment, size);
     return m_heap.tryAllocateLarge(lock, alignment, size);
@@ -112,7 +112,7 @@
         break;
     }
     case ObjectType::Large: {
-        std::lock_guard<StaticMutex> lock(Heap::mutex());
+        std::lock_guard<Mutex> lock(Heap::mutex());
         oldSize = m_heap.largeSize(lock, object);
 
         if (newSize < oldSize && newSize > smallMax) {
@@ -153,7 +153,7 @@
 {
     BumpRangeCache& bumpRangeCache = m_bumpRangeCaches[sizeClass];
 
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
     m_deallocator.processObjectLog(lock);
     m_heap.allocateSmallBumpRanges(lock, sizeClass, allocator, bumpRangeCache, m_deallocator.lineCache(lock));
 }
@@ -168,7 +168,7 @@
 
 BNO_INLINE void* Allocator::allocateLarge(size_t size)
 {
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
     return m_heap.allocateLarge(lock, alignment, size);
 }
 

Modified: trunk/Source/bmalloc/bmalloc/CryptoRandom.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/CryptoRandom.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/CryptoRandom.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -65,7 +65,7 @@
 
 class ARC4RandomNumberGenerator {
 public:
-    ARC4RandomNumberGenerator(const std::lock_guard<StaticMutex>&);
+    ARC4RandomNumberGenerator(const std::lock_guard<Mutex>&);
 
     uint32_t randomNumber();
     void randomValues(void* buffer, size_t length);
@@ -89,7 +89,7 @@
     j = 0;
 }
 
-ARC4RandomNumberGenerator::ARC4RandomNumberGenerator(const std::lock_guard<StaticMutex>&)
+ARC4RandomNumberGenerator::ARC4RandomNumberGenerator(const std::lock_guard<Mutex>&)
     : m_count(0)
 {
 }

Modified: trunk/Source/bmalloc/bmalloc/Deallocator.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Deallocator.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Deallocator.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -60,13 +60,13 @@
     if (m_debugHeap)
         return;
 
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
 
     processObjectLog(lock);
     m_heap.deallocateLineCache(lock, lineCache(lock));
 }
 
-void Deallocator::processObjectLog(std::lock_guard<StaticMutex>& lock)
+void Deallocator::processObjectLog(std::lock_guard<Mutex>& lock)
 {
     for (Object object : m_objectLog)
         m_heap.derefSmallLine(lock, object, lineCache(lock));
@@ -81,7 +81,7 @@
     if (!object)
         return;
 
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
     if (m_heap.isLarge(lock, object)) {
         m_heap.deallocateLarge(lock, object);
         return;

Modified: trunk/Source/bmalloc/bmalloc/Deallocator.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Deallocator.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Deallocator.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -35,7 +35,7 @@
 
 class DebugHeap;
 class Heap;
-class StaticMutex;
+class Mutex;
 
 // Per-cache object deallocator.
 
@@ -47,9 +47,9 @@
     void deallocate(void*);
     void scavenge();
     
-    void processObjectLog(std::lock_guard<StaticMutex>&);
+    void processObjectLog(std::lock_guard<Mutex>&);
     
-    LineCache& lineCache(std::lock_guard<StaticMutex>&) { return m_lineCache; }
+    LineCache& lineCache(std::lock_guard<Mutex>&) { return m_lineCache; }
 
 private:
     bool deallocateFastCase(void*);

Modified: trunk/Source/bmalloc/bmalloc/DebugHeap.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/DebugHeap.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/DebugHeap.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -36,7 +36,7 @@
     
 #if BOS(DARWIN)
 
-DebugHeap::DebugHeap(std::lock_guard<StaticMutex>&)
+DebugHeap::DebugHeap(std::lock_guard<Mutex>&)
     : m_zone(malloc_create_zone(0, 0))
     , m_pageSize(vmPageSize())
 {
@@ -74,7 +74,7 @@
 
 #else
 
-DebugHeap::DebugHeap(std::lock_guard<StaticMutex>&)
+DebugHeap::DebugHeap(std::lock_guard<Mutex>&)
 {
 }
 

Modified: trunk/Source/bmalloc/bmalloc/DebugHeap.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/DebugHeap.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/DebugHeap.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#include "StaticMutex.h"
+#include "Mutex.h"
 #include <mutex>
 #include <unordered_map>
 
@@ -37,7 +37,7 @@
     
 class DebugHeap {
 public:
-    DebugHeap(std::lock_guard<StaticMutex>&);
+    DebugHeap(std::lock_guard<Mutex>&);
     
     void* malloc(size_t);
     void* memalign(size_t alignment, size_t, bool crashOnFailure);

Modified: trunk/Source/bmalloc/bmalloc/Environment.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Environment.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Environment.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -107,7 +107,7 @@
 #endif
 }
 
-Environment::Environment(std::lock_guard<StaticMutex>&)
+Environment::Environment(std::lock_guard<Mutex>&)
     : m_isDebugHeapEnabled(computeIsDebugHeapEnabled())
 {
 }

Modified: trunk/Source/bmalloc/bmalloc/Environment.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Environment.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Environment.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -26,13 +26,13 @@
 #ifndef Environment_h
 #define Environment_h
 
-#include "StaticMutex.h"
+#include "Mutex.h"
 
 namespace bmalloc {
 
 class Environment {
 public:
-    Environment(std::lock_guard<StaticMutex>&);
+    Environment(std::lock_guard<Mutex>&);
     
     bool isDebugHeapEnabled() { return m_isDebugHeapEnabled; }
 

Modified: trunk/Source/bmalloc/bmalloc/Gigacage.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Gigacage.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Gigacage.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -94,7 +94,7 @@
 };
 
 struct PrimitiveDisableCallbacks {
-    PrimitiveDisableCallbacks(std::lock_guard<StaticMutex>&) { }
+    PrimitiveDisableCallbacks(std::lock_guard<Mutex>&) { }
     
     Vector<Callback> callbacks;
 };
@@ -186,7 +186,7 @@
     }
     
     PrimitiveDisableCallbacks& callbacks = *PerProcess<PrimitiveDisableCallbacks>::get();
-    std::unique_lock<StaticMutex> lock(PerProcess<PrimitiveDisableCallbacks>::mutex());
+    std::unique_lock<Mutex> lock(PerProcess<PrimitiveDisableCallbacks>::mutex());
     for (Callback& callback : callbacks.callbacks)
         callback.function(callback.argument);
     callbacks.callbacks.shrink(0);
@@ -204,7 +204,7 @@
     }
     
     PrimitiveDisableCallbacks& callbacks = *PerProcess<PrimitiveDisableCallbacks>::get();
-    std::unique_lock<StaticMutex> lock(PerProcess<PrimitiveDisableCallbacks>::mutex());
+    std::unique_lock<Mutex> lock(PerProcess<PrimitiveDisableCallbacks>::mutex());
     callbacks.callbacks.push(Callback(function, argument));
 }
 
@@ -211,7 +211,7 @@
 void removePrimitiveDisableCallback(void (*function)(void*), void* argument)
 {
     PrimitiveDisableCallbacks& callbacks = *PerProcess<PrimitiveDisableCallbacks>::get();
-    std::unique_lock<StaticMutex> lock(PerProcess<PrimitiveDisableCallbacks>::mutex());
+    std::unique_lock<Mutex> lock(PerProcess<PrimitiveDisableCallbacks>::mutex());
     for (size_t i = 0; i < callbacks.callbacks.size(); ++i) {
         if (callbacks.callbacks[i].function == function
             && callbacks.callbacks[i].argument == argument) {

Modified: trunk/Source/bmalloc/bmalloc/Heap.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Heap.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Heap.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -41,7 +41,7 @@
 
 namespace bmalloc {
 
-Heap::Heap(HeapKind kind, std::lock_guard<StaticMutex>&)
+Heap::Heap(HeapKind kind, std::lock_guard<Mutex>&)
     : m_kind(kind)
     , m_vmPageSizePhysical(vmPageSizePhysical())
     , m_debugHeap(nullptr)
@@ -138,7 +138,7 @@
         m_pageClasses[i] = (computePageSize(i) - 1) / smallPageSize;
 }
 
-size_t Heap::freeableMemory(std::lock_guard<StaticMutex>&)
+size_t Heap::freeableMemory(std::lock_guard<Mutex>&)
 {
     size_t result = 0;
     for (auto& list : m_freePages) {
@@ -162,7 +162,7 @@
     return m_footprint;
 }
 
-void Heap::scavenge(std::lock_guard<StaticMutex>&)
+void Heap::scavenge(std::lock_guard<Mutex>&)
 {
     for (auto& list : m_freePages) {
         for (auto* chunk : list) {
@@ -197,7 +197,7 @@
     }
 }
 
-void Heap::deallocateLineCache(std::lock_guard<StaticMutex>&, LineCache& lineCache)
+void Heap::deallocateLineCache(std::lock_guard<Mutex>&, LineCache& lineCache)
 {
     for (auto& list : lineCache) {
         while (!list.isEmpty()) {
@@ -207,7 +207,7 @@
     }
 }
 
-void Heap::allocateSmallChunk(std::lock_guard<StaticMutex>& lock, size_t pageClass)
+void Heap::allocateSmallChunk(std::lock_guard<Mutex>& lock, size_t pageClass)
 {
     RELEASE_BASSERT(isActiveHeapKind(m_kind));
     
@@ -256,7 +256,7 @@
     m_largeFree.add(LargeRange(chunk, size, startPhysicalSize, totalPhysicalSize));
 }
 
-SmallPage* Heap::allocateSmallPage(std::lock_guard<StaticMutex>& lock, size_t sizeClass, LineCache& lineCache)
+SmallPage* Heap::allocateSmallPage(std::lock_guard<Mutex>& lock, size_t sizeClass, LineCache& lineCache)
 {
     RELEASE_BASSERT(isActiveHeapKind(m_kind));
 
@@ -300,7 +300,7 @@
     return page;
 }
 
-void Heap::deallocateSmallLine(std::lock_guard<StaticMutex>& lock, Object object, LineCache& lineCache)
+void Heap::deallocateSmallLine(std::lock_guard<Mutex>& lock, Object object, LineCache& lineCache)
 {
     BASSERT(!object.line()->refCount(lock));
     SmallPage* page = object.page();
@@ -339,7 +339,7 @@
 }
 
 void Heap::allocateSmallBumpRangesByMetadata(
-    std::lock_guard<StaticMutex>& lock, size_t sizeClass,
+    std::lock_guard<Mutex>& lock, size_t sizeClass,
     BumpAllocator& allocator, BumpRangeCache& rangeCache,
     LineCache& lineCache)
 {
@@ -403,7 +403,7 @@
 }
 
 void Heap::allocateSmallBumpRangesByObject(
-    std::lock_guard<StaticMutex>& lock, size_t sizeClass,
+    std::lock_guard<Mutex>& lock, size_t sizeClass,
     BumpAllocator& allocator, BumpRangeCache& rangeCache,
     LineCache& lineCache)
 {
@@ -459,7 +459,7 @@
     }
 }
 
-LargeRange Heap::splitAndAllocate(std::lock_guard<StaticMutex>&, LargeRange& range, size_t alignment, size_t size)
+LargeRange Heap::splitAndAllocate(std::lock_guard<Mutex>&, LargeRange& range, size_t alignment, size_t size)
 {
     RELEASE_BASSERT(isActiveHeapKind(m_kind));
 
@@ -503,7 +503,7 @@
     return range;
 }
 
-void* Heap::tryAllocateLarge(std::lock_guard<StaticMutex>& lock, size_t alignment, size_t size)
+void* Heap::tryAllocateLarge(std::lock_guard<Mutex>& lock, size_t alignment, size_t size)
 {
     RELEASE_BASSERT(isActiveHeapKind(m_kind));
 
@@ -541,7 +541,7 @@
     return splitAndAllocate(lock, range, alignment, size).begin();
 }
 
-void* Heap::allocateLarge(std::lock_guard<StaticMutex>& lock, size_t alignment, size_t size)
+void* Heap::allocateLarge(std::lock_guard<Mutex>& lock, size_t alignment, size_t size)
 {
     void* result = tryAllocateLarge(lock, alignment, size);
     RELEASE_BASSERT(result);
@@ -548,17 +548,17 @@
     return result;
 }
 
-bool Heap::isLarge(std::lock_guard<StaticMutex>&, void* object)
+bool Heap::isLarge(std::lock_guard<Mutex>&, void* object)
 {
     return m_objectTypes.get(Object(object).chunk()) == ObjectType::Large;
 }
 
-size_t Heap::largeSize(std::lock_guard<StaticMutex>&, void* object)
+size_t Heap::largeSize(std::lock_guard<Mutex>&, void* object)
 {
     return m_largeAllocated.get(object);
 }
 
-void Heap::shrinkLarge(std::lock_guard<StaticMutex>& lock, const Range& object, size_t newSize)
+void Heap::shrinkLarge(std::lock_guard<Mutex>& lock, const Range& object, size_t newSize)
 {
     BASSERT(object.size() > newSize);
 
@@ -569,7 +569,7 @@
     m_scavenger->schedule(size);
 }
 
-void Heap::deallocateLarge(std::lock_guard<StaticMutex>&, void* object)
+void Heap::deallocateLarge(std::lock_guard<Mutex>&, void* object)
 {
     if (m_debugHeap)
         return m_debugHeap->freeLarge(object);
@@ -581,11 +581,11 @@
 
 void Heap::externalCommit(void* ptr, size_t size)
 {
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
     externalCommit(lock, ptr, size);
 }
 
-void Heap::externalCommit(std::lock_guard<StaticMutex>&, void* ptr, size_t size)
+void Heap::externalCommit(std::lock_guard<Mutex>&, void* ptr, size_t size)
 {
     BUNUSED_PARAM(ptr);
 
@@ -597,11 +597,11 @@
 
 void Heap::externalDecommit(void* ptr, size_t size)
 {
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
     externalDecommit(lock, ptr, size);
 }
 
-void Heap::externalDecommit(std::lock_guard<StaticMutex>&, void* ptr, size_t size)
+void Heap::externalDecommit(std::lock_guard<Mutex>&, void* ptr, size_t size)
 {
     BUNUSED_PARAM(ptr);
 

Modified: trunk/Source/bmalloc/bmalloc/Heap.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Heap.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Heap.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -54,36 +54,36 @@
 
 class Heap {
 public:
-    Heap(HeapKind, std::lock_guard<StaticMutex>&);
+    Heap(HeapKind, std::lock_guard<Mutex>&);
     
-    static StaticMutex& mutex() { return PerProcess<PerHeapKind<Heap>>::mutex(); }
+    static Mutex& mutex() { return PerProcess<PerHeapKind<Heap>>::mutex(); }
     
     HeapKind kind() const { return m_kind; }
     
     DebugHeap* debugHeap() { return m_debugHeap; }
 
-    void allocateSmallBumpRanges(std::lock_guard<StaticMutex>&, size_t sizeClass,
+    void allocateSmallBumpRanges(std::lock_guard<Mutex>&, size_t sizeClass,
         BumpAllocator&, BumpRangeCache&, LineCache&);
-    void derefSmallLine(std::lock_guard<StaticMutex>&, Object, LineCache&);
-    void deallocateLineCache(std::lock_guard<StaticMutex>&, LineCache&);
+    void derefSmallLine(std::lock_guard<Mutex>&, Object, LineCache&);
+    void deallocateLineCache(std::lock_guard<Mutex>&, LineCache&);
 
-    void* allocateLarge(std::lock_guard<StaticMutex>&, size_t alignment, size_t);
-    void* tryAllocateLarge(std::lock_guard<StaticMutex>&, size_t alignment, size_t);
-    void deallocateLarge(std::lock_guard<StaticMutex>&, void*);
+    void* allocateLarge(std::lock_guard<Mutex>&, size_t alignment, size_t);
+    void* tryAllocateLarge(std::lock_guard<Mutex>&, size_t alignment, size_t);
+    void deallocateLarge(std::lock_guard<Mutex>&, void*);
 
-    bool isLarge(std::lock_guard<StaticMutex>&, void*);
-    size_t largeSize(std::lock_guard<StaticMutex>&, void*);
-    void shrinkLarge(std::lock_guard<StaticMutex>&, const Range&, size_t);
+    bool isLarge(std::lock_guard<Mutex>&, void*);
+    size_t largeSize(std::lock_guard<Mutex>&, void*);
+    void shrinkLarge(std::lock_guard<Mutex>&, const Range&, size_t);
 
-    void scavenge(std::lock_guard<StaticMutex>&);
+    void scavenge(std::lock_guard<Mutex>&);
 
-    size_t freeableMemory(std::lock_guard<StaticMutex>&);
+    size_t freeableMemory(std::lock_guard<Mutex>&);
     size_t footprint();
 
     void externalDecommit(void* ptr, size_t);
-    void externalDecommit(std::lock_guard<StaticMutex>&, void* ptr, size_t);
+    void externalDecommit(std::lock_guard<Mutex>&, void* ptr, size_t);
     void externalCommit(void* ptr, size_t);
-    void externalCommit(std::lock_guard<StaticMutex>&, void* ptr, size_t);
+    void externalCommit(std::lock_guard<Mutex>&, void* ptr, size_t);
 
 private:
     struct LargeObjectHash {
@@ -103,15 +103,15 @@
     void initializeLineMetadata();
     void initializePageMetadata();
 
-    void allocateSmallBumpRangesByMetadata(std::lock_guard<StaticMutex>&,
+    void allocateSmallBumpRangesByMetadata(std::lock_guard<Mutex>&,
         size_t sizeClass, BumpAllocator&, BumpRangeCache&, LineCache&);
-    void allocateSmallBumpRangesByObject(std::lock_guard<StaticMutex>&,
+    void allocateSmallBumpRangesByObject(std::lock_guard<Mutex>&,
         size_t sizeClass, BumpAllocator&, BumpRangeCache&, LineCache&);
 
-    SmallPage* allocateSmallPage(std::lock_guard<StaticMutex>&, size_t sizeClass, LineCache&);
-    void deallocateSmallLine(std::lock_guard<StaticMutex>&, Object, LineCache&);
+    SmallPage* allocateSmallPage(std::lock_guard<Mutex>&, size_t sizeClass, LineCache&);
+    void deallocateSmallLine(std::lock_guard<Mutex>&, Object, LineCache&);
 
-    void allocateSmallChunk(std::lock_guard<StaticMutex>&, size_t pageClass);
+    void allocateSmallChunk(std::lock_guard<Mutex>&, size_t pageClass);
     void deallocateSmallChunk(Chunk*, size_t pageClass);
 
     void mergeLarge(BeginTag*&, EndTag*&, Range&);
@@ -118,7 +118,7 @@
     void mergeLargeLeft(EndTag*&, BeginTag*&, Range&, bool& inVMHeap);
     void mergeLargeRight(EndTag*&, BeginTag*&, Range&, bool& inVMHeap);
 
-    LargeRange splitAndAllocate(std::lock_guard<StaticMutex>&, LargeRange&, size_t alignment, size_t);
+    LargeRange splitAndAllocate(std::lock_guard<Mutex>&, LargeRange&, size_t alignment, size_t);
 
     HeapKind m_kind;
     
@@ -146,7 +146,7 @@
 };
 
 inline void Heap::allocateSmallBumpRanges(
-    std::lock_guard<StaticMutex>& lock, size_t sizeClass,
+    std::lock_guard<Mutex>& lock, size_t sizeClass,
     BumpAllocator& allocator, BumpRangeCache& rangeCache,
     LineCache& lineCache)
 {
@@ -155,7 +155,7 @@
     return allocateSmallBumpRangesByObject(lock, sizeClass, allocator, rangeCache, lineCache);
 }
 
-inline void Heap::derefSmallLine(std::lock_guard<StaticMutex>& lock, Object object, LineCache& lineCache)
+inline void Heap::derefSmallLine(std::lock_guard<Mutex>& lock, Object object, LineCache& lineCache)
 {
     if (!object.line()->deref(lock))
         return;

Modified: trunk/Source/bmalloc/bmalloc/IsoDeallocator.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/IsoDeallocator.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/IsoDeallocator.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -27,11 +27,10 @@
 
 #include "FixedVector.h"
 #include "IsoPage.h"
+#include "Mutex.h"
 
 namespace bmalloc {
 
-class Mutex;
-
 template<typename Config>
 class IsoDeallocator {
 public:

Modified: trunk/Source/bmalloc/bmalloc/IsoHeap.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/IsoHeap.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/IsoHeap.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -26,7 +26,7 @@
 #pragma once
 
 #include "IsoConfig.h"
-#include "StaticMutex.h"
+#include "Mutex.h"
 
 namespace bmalloc {
 
@@ -60,7 +60,7 @@
     
     IsoHeapImpl<Config>& impl();
     
-    StaticMutex m_initializationLock;
+    Mutex m_initializationLock;
     unsigned m_allocatorOffsetPlusOne;
     unsigned m_deallocatorOffsetPlusOne;
     IsoHeapImpl<Config>* m_impl;

Modified: trunk/Source/bmalloc/bmalloc/IsoTLSDeallocatorEntry.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/IsoTLSDeallocatorEntry.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/IsoTLSDeallocatorEntry.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -27,7 +27,7 @@
 
 #include "IsoDeallocator.h"
 #include "IsoTLSEntry.h"
-#include "StaticMutex.h"
+#include "Mutex.h"
 #include <mutex>
 
 namespace bmalloc {
@@ -35,7 +35,7 @@
 template<typename Config>
 class IsoTLSDeallocatorEntry : public DefaultIsoTLSEntry<IsoDeallocator<Config>> {
 public:
-    IsoTLSDeallocatorEntry(const std::lock_guard<StaticMutex>&);
+    IsoTLSDeallocatorEntry(const std::lock_guard<Mutex>&);
     ~IsoTLSDeallocatorEntry();
     
     // This is used as the heap lock, since heaps in the same size class share the same deallocator

Modified: trunk/Source/bmalloc/bmalloc/IsoTLSDeallocatorEntryInlines.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/IsoTLSDeallocatorEntryInlines.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/IsoTLSDeallocatorEntryInlines.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -28,7 +28,7 @@
 namespace bmalloc {
 
 template<typename Config>
-IsoTLSDeallocatorEntry<Config>::IsoTLSDeallocatorEntry(const std::lock_guard<StaticMutex>&)
+IsoTLSDeallocatorEntry<Config>::IsoTLSDeallocatorEntry(const std::lock_guard<Mutex>&)
 {
 }
 

Modified: trunk/Source/bmalloc/bmalloc/IsoTLSInlines.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/IsoTLSInlines.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/IsoTLSInlines.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -172,7 +172,7 @@
 void IsoTLS::ensureHeap(api::IsoHeap<Type>& handle)
 {
     if (!handle.isInitialized()) {
-        std::lock_guard<StaticMutex> locker(handle.m_initializationLock);
+        std::lock_guard<Mutex> locker(handle.m_initializationLock);
         if (!handle.isInitialized()) {
             auto* heap = new IsoHeapImpl<typename api::IsoHeap<Type>::Config>();
             std::atomic_thread_fence(std::memory_order_seq_cst);

Modified: trunk/Source/bmalloc/bmalloc/IsoTLSLayout.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/IsoTLSLayout.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/IsoTLSLayout.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -29,15 +29,15 @@
 
 namespace bmalloc {
 
-IsoTLSLayout::IsoTLSLayout(const std::lock_guard<StaticMutex>&)
+IsoTLSLayout::IsoTLSLayout(const std::lock_guard<Mutex>&)
 {
 }
 
 void IsoTLSLayout::add(IsoTLSEntry* entry)
 {
-    static StaticMutex addingMutex;
+    static Mutex addingMutex;
     RELEASE_BASSERT(!entry->m_next);
-    std::lock_guard<StaticMutex> locking(addingMutex);
+    std::lock_guard<Mutex> locking(addingMutex);
     if (m_head) {
         RELEASE_BASSERT(m_tail);
         entry->m_offset = roundUpToMultipleOf(entry->alignment(), m_tail->extent());

Modified: trunk/Source/bmalloc/bmalloc/IsoTLSLayout.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/IsoTLSLayout.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/IsoTLSLayout.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#include "StaticMutex.h"
+#include "Mutex.h"
 #include <mutex>
 
 namespace bmalloc {
@@ -34,7 +34,7 @@
 
 class IsoTLSLayout {
 public:
-    IsoTLSLayout(const std::lock_guard<StaticMutex>&);
+    IsoTLSLayout(const std::lock_guard<Mutex>&);
     
     void add(IsoTLSEntry*);
     

Copied: trunk/Source/bmalloc/bmalloc/Mutex.cpp (from rev 230307, trunk/Source/bmalloc/bmalloc/StaticMutex.cpp) (0 => 230308)


--- trunk/Source/bmalloc/bmalloc/Mutex.cpp	                        (rev 0)
+++ trunk/Source/bmalloc/bmalloc/Mutex.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2018 Yusuke Suzuki <utatane....@gmail.com>.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "Mutex.h"
+
+#include "ScopeExit.h"
+#include <thread>
+
+namespace bmalloc {
+
+void Mutex::lockSlowCase()
+{
+    // The longest critical section in bmalloc is much shorter than the
+    // time it takes to make a system call to yield to the OS scheduler.
+    // So, we try again a lot before we yield.
+    static const size_t aLot = 256;
+    
+    if (!m_isSpinning.exchange(true)) {
+        auto clear = makeScopeExit([&] { m_isSpinning.store(false); });
+
+        for (size_t i = 0; i < aLot; ++i) {
+            if (try_lock())
+                return;
+        }
+    }
+
+    // Avoid spinning pathologically.
+    while (!try_lock())
+        sched_yield();
+}
+
+} // namespace bmalloc

Modified: trunk/Source/bmalloc/bmalloc/Mutex.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Mutex.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Mutex.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2018 Yusuke Suzuki <utatane....@gmail.com>.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -23,26 +24,67 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef Mutex_h
-#define Mutex_h
+#pragma once
 
-#include "StaticMutex.h"
+#include "BAssert.h"
+#include <atomic>
+#include <mutex>
+#include <thread>
 
-// A fast replacement for std::mutex, for use in standard storage.
+// A fast replacement for std::mutex.
 
 namespace bmalloc {
 
-class Mutex : public StaticMutex {
+class Mutex {
 public:
-    Mutex();
+    Mutex() = default;
+
+    void lock();
+    bool try_lock();
+    void unlock();
+
+private:
+    BEXPORT void lockSlowCase();
+
+    std::atomic<bool> m_flag { false };
+    std::atomic<bool> m_isSpinning { false };
 };
 
-inline Mutex::Mutex()
+static inline void sleep(
+    std::unique_lock<Mutex>& lock, std::chrono::milliseconds duration)
 {
-    // StaticMutex requires explicit initialization when used in non-static storage.
-    init();
+    if (duration == std::chrono::milliseconds(0))
+        return;
+    
+    lock.unlock();
+    std::this_thread::sleep_for(duration);
+    lock.lock();
 }
 
+static inline void waitUntilFalse(
+    std::unique_lock<Mutex>& lock, std::chrono::milliseconds sleepDuration,
+    bool& condition)
+{
+    while (condition) {
+        condition = false;
+        sleep(lock, sleepDuration);
+    }
+}
+
+inline bool Mutex::try_lock()
+{
+    return !m_flag.exchange(true, std::memory_order_acquire);
+}
+
+inline void Mutex::lock()
+{
+    if (!try_lock())
+        lockSlowCase();
+}
+
+inline void Mutex::unlock()
+{
+    m_flag.store(false, std::memory_order_release);
+}
+
 } // namespace bmalloc
-
-#endif // Mutex_h

Modified: trunk/Source/bmalloc/bmalloc/ObjectType.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/ObjectType.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/ObjectType.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -38,7 +38,7 @@
         if (!object)
             return ObjectType::Small;
 
-        std::lock_guard<StaticMutex> lock(Heap::mutex());
+        std::lock_guard<Mutex> lock(Heap::mutex());
         if (PerProcess<PerHeapKind<Heap>>::getFastCase()->at(kind).isLarge(lock, object))
             return ObjectType::Large;
     }

Modified: trunk/Source/bmalloc/bmalloc/PerProcess.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/PerProcess.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/PerProcess.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -32,7 +32,7 @@
 static constexpr unsigned tableSize = 100;
 static constexpr bool verbose = false;
 
-static StaticMutex s_mutex;
+static Mutex s_mutex;
 
 static char* s_bumpBase;
 static size_t s_bumpOffset;
@@ -59,7 +59,7 @@
 
 PerProcessData* getPerProcessData(unsigned hash, const char* disambiguator, size_t size, size_t alignment)
 {
-    std::lock_guard<StaticMutex> lock(s_mutex);
+    std::lock_guard<Mutex> lock(s_mutex);
 
     PerProcessData*& bucket = s_table[hash % tableSize];
     

Modified: trunk/Source/bmalloc/bmalloc/PerProcess.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/PerProcess.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/PerProcess.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -26,9 +26,8 @@
 #pragma once
 
 #include "BInline.h"
+#include "Mutex.h"
 #include "Sizes.h"
-#include "StaticMutex.h"
-#include <mutex>
 
 namespace bmalloc {
 
@@ -47,7 +46,7 @@
 // x = object->m_field; // OK
 // if (globalFlag) { ... } // Undefined behavior.
 //
-// std::lock_guard<StaticMutex> lock(PerProcess<Object>::mutex());
+// std::lock_guard<Mutex> lock(PerProcess<Object>::mutex());
 // Object* object = PerProcess<Object>::get(lock);
 // if (globalFlag) { ... } // OK.
 
@@ -56,7 +55,7 @@
     void* memory;
     size_t size;
     size_t alignment;
-    StaticMutex mutex;
+    Mutex mutex;
     bool isInitialized;
     PerProcessData* next;
 };
@@ -87,7 +86,7 @@
         return s_object.load(std::memory_order_relaxed);
     }
     
-    static StaticMutex& mutex()
+    static Mutex& mutex()
     {
         if (!s_data)
             coalesce();
@@ -106,7 +105,7 @@
     
     BNO_INLINE static T* getSlowCase()
     {
-        std::lock_guard<StaticMutex> lock(mutex());
+        std::lock_guard<Mutex> lock(mutex());
         if (!s_object.load()) {
             if (s_data->isInitialized)
                 s_object.store(static_cast<T*>(s_data->memory));

Modified: trunk/Source/bmalloc/bmalloc/Scavenger.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Scavenger.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Scavenger.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -41,7 +41,7 @@
 
 static constexpr bool verbose = false;
 
-Scavenger::Scavenger(std::lock_guard<StaticMutex>&)
+Scavenger::Scavenger(std::lock_guard<Mutex>&)
 {
 #if BOS(DARWIN)
     auto queue = dispatch_queue_create("WebKit Malloc Memory Pressure Handler", DISPATCH_QUEUE_SERIAL);
@@ -152,7 +152,7 @@
     }
 
     {
-        std::lock_guard<StaticMutex> lock(Heap::mutex());
+        std::lock_guard<Mutex> lock(Heap::mutex());
         for (unsigned i = numHeaps; i--;) {
             if (!isActiveHeapKind(static_cast<HeapKind>(i)))
                 continue;
@@ -182,7 +182,7 @@
 {
     size_t result = 0;
     {
-        std::lock_guard<StaticMutex> lock(Heap::mutex());
+        std::lock_guard<Mutex> lock(Heap::mutex());
         for (unsigned i = numHeaps; i--;) {
             if (!isActiveHeapKind(static_cast<HeapKind>(i)))
                 continue;

Modified: trunk/Source/bmalloc/bmalloc/Scavenger.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Scavenger.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Scavenger.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -41,7 +41,7 @@
 
 class Scavenger {
 public:
-    BEXPORT Scavenger(std::lock_guard<StaticMutex>&);
+    BEXPORT Scavenger(std::lock_guard<Mutex>&);
     
     ~Scavenger() = delete;
     

Modified: trunk/Source/bmalloc/bmalloc/SmallLine.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/SmallLine.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/SmallLine.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -35,9 +35,9 @@
 
 class SmallLine {
 public:
-    void ref(std::lock_guard<StaticMutex>&, unsigned char = 1);
-    bool deref(std::lock_guard<StaticMutex>&);
-    unsigned refCount(std::lock_guard<StaticMutex>&) { return m_refCount; }
+    void ref(std::lock_guard<Mutex>&, unsigned char = 1);
+    bool deref(std::lock_guard<Mutex>&);
+    unsigned refCount(std::lock_guard<Mutex>&) { return m_refCount; }
     
     char* begin();
     char* end();
@@ -51,13 +51,13 @@
 
 };
 
-inline void SmallLine::ref(std::lock_guard<StaticMutex>&, unsigned char refCount)
+inline void SmallLine::ref(std::lock_guard<Mutex>&, unsigned char refCount)
 {
     BASSERT(!m_refCount);
     m_refCount = refCount;
 }
 
-inline bool SmallLine::deref(std::lock_guard<StaticMutex>&)
+inline bool SmallLine::deref(std::lock_guard<Mutex>&)
 {
     BASSERT(m_refCount);
     --m_refCount;

Modified: trunk/Source/bmalloc/bmalloc/SmallPage.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/SmallPage.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/SmallPage.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -38,15 +38,15 @@
 
 class SmallPage : public ListNode<SmallPage> {
 public:
-    void ref(std::lock_guard<StaticMutex>&);
-    bool deref(std::lock_guard<StaticMutex>&);
-    unsigned refCount(std::lock_guard<StaticMutex>&) { return m_refCount; }
+    void ref(std::lock_guard<Mutex>&);
+    bool deref(std::lock_guard<Mutex>&);
+    unsigned refCount(std::lock_guard<Mutex>&) { return m_refCount; }
     
     size_t sizeClass() { return m_sizeClass; }
     void setSizeClass(size_t sizeClass) { m_sizeClass = sizeClass; }
     
-    bool hasFreeLines(std::lock_guard<StaticMutex>&) const { return m_hasFreeLines; }
-    void setHasFreeLines(std::lock_guard<StaticMutex>&, bool hasFreeLines) { m_hasFreeLines = hasFreeLines; }
+    bool hasFreeLines(std::lock_guard<Mutex>&) const { return m_hasFreeLines; }
+    void setHasFreeLines(std::lock_guard<Mutex>&, bool hasFreeLines) { m_hasFreeLines = hasFreeLines; }
     
     bool hasPhysicalPages() { return m_hasPhysicalPages; }
     void setHasPhysicalPages(bool hasPhysicalPages) { m_hasPhysicalPages = hasPhysicalPages; }
@@ -70,7 +70,7 @@
 
 using LineCache = std::array<List<SmallPage>, sizeClassCount>;
 
-inline void SmallPage::ref(std::lock_guard<StaticMutex>&)
+inline void SmallPage::ref(std::lock_guard<Mutex>&)
 {
     BASSERT(!m_slide);
     ++m_refCount;
@@ -77,7 +77,7 @@
     BASSERT(m_refCount);
 }
 
-inline bool SmallPage::deref(std::lock_guard<StaticMutex>&)
+inline bool SmallPage::deref(std::lock_guard<Mutex>&)
 {
     BASSERT(!m_slide);
     BASSERT(m_refCount);

Deleted: trunk/Source/bmalloc/bmalloc/StaticMutex.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/StaticMutex.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/StaticMutex.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#include "ScopeExit.h"
-#include "StaticMutex.h"
-#include <thread>
-
-namespace bmalloc {
-
-void StaticMutex::lockSlowCase()
-{
-    // The longest critical section in bmalloc is much shorter than the
-    // time it takes to make a system call to yield to the OS scheduler.
-    // So, we try again a lot before we yield.
-    static const size_t aLot = 256;
-    
-    if (!m_isSpinning.test_and_set()) {
-        auto clear = makeScopeExit([&] { m_isSpinning.clear(); });
-
-        for (size_t i = 0; i < aLot; ++i) {
-            if (try_lock())
-                return;
-        }
-    }
-
-    // Avoid spinning pathologically.
-    while (!try_lock())
-        sched_yield();
-}
-
-} // namespace bmalloc

Deleted: trunk/Source/bmalloc/bmalloc/StaticMutex.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/StaticMutex.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/StaticMutex.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef StaticMutex_h
-#define StaticMutex_h
-
-#include "BAssert.h"
-#include <atomic>
-#include <mutex>
-#include <thread>
-
-// A fast replacement for std::mutex, for use in static storage.
-
-// Use StaticMutex in static storage, where global constructors and exit-time
-// destructors are prohibited, but all memory is zero-initialized automatically.
-
-namespace bmalloc {
-
-class StaticMutex {
-protected:
-    // Subclasses that support non-static storage must use explicit initialization.
-    void init();
-
-public:
-    void lock();
-    bool try_lock();
-    void unlock();
-
-private:
-    BEXPORT void lockSlowCase();
-
-    std::atomic_flag m_flag;
-    std::atomic_flag m_isSpinning;
-};
-
-static inline void sleep(
-    std::unique_lock<StaticMutex>& lock, std::chrono::milliseconds duration)
-{
-    if (duration == std::chrono::milliseconds(0))
-        return;
-    
-    lock.unlock();
-    std::this_thread::sleep_for(duration);
-    lock.lock();
-}
-
-static inline void waitUntilFalse(
-    std::unique_lock<StaticMutex>& lock, std::chrono::milliseconds sleepDuration,
-    bool& condition)
-{
-    while (condition) {
-        condition = false;
-        sleep(lock, sleepDuration);
-    }
-}
-
-inline void StaticMutex::init()
-{
-    m_flag.clear();
-    m_isSpinning.clear();
-}
-
-inline bool StaticMutex::try_lock()
-{
-    return !m_flag.test_and_set(std::memory_order_acquire);
-}
-
-inline void StaticMutex::lock()
-{
-    if (!try_lock())
-        lockSlowCase();
-}
-
-inline void StaticMutex::unlock()
-{
-    m_flag.clear(std::memory_order_release);
-}
-
-} // namespace bmalloc
-
-#endif // StaticMutex_h

Modified: trunk/Source/bmalloc/bmalloc/VMHeap.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/VMHeap.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/VMHeap.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -29,7 +29,7 @@
 
 namespace bmalloc {
 
-VMHeap::VMHeap(std::lock_guard<StaticMutex>&)
+VMHeap::VMHeap(std::lock_guard<Mutex>&)
 {
 }
 

Modified: trunk/Source/bmalloc/bmalloc/VMHeap.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/VMHeap.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/VMHeap.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -46,7 +46,7 @@
 
 class VMHeap {
 public:
-    VMHeap(std::lock_guard<StaticMutex>&);
+    VMHeap(std::lock_guard<Mutex>&);
     
     LargeRange tryAllocateLargeChunk(size_t alignment, size_t);
 };

Modified: trunk/Source/bmalloc/bmalloc/Zone.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Zone.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Zone.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -115,7 +115,7 @@
     .statistics = bmalloc::statistics
 };
 
-Zone::Zone(std::lock_guard<StaticMutex>&)
+Zone::Zone(std::lock_guard<Mutex>&)
 {
     malloc_zone_t::size = &bmalloc::zoneSize;
     malloc_zone_t::zone_name = "WebKit Malloc";

Modified: trunk/Source/bmalloc/bmalloc/Zone.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/Zone.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/Zone.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -27,8 +27,8 @@
 #define Zone_h
 
 #include "FixedVector.h"
+#include "Mutex.h"
 #include "Range.h"
-#include "StaticMutex.h"
 #include <malloc/malloc.h>
 #include <mutex>
 
@@ -41,7 +41,7 @@
     // Enough capacity to track a 64GB heap, so probably enough for anything.
     static const size_t capacity = 2048;
 
-    Zone(std::lock_guard<StaticMutex>&);
+    Zone(std::lock_guard<Mutex>&);
     Zone(task_t, memory_reader_t, vm_address_t);
 
     void addRange(Range);

Modified: trunk/Source/bmalloc/bmalloc/bmalloc.cpp (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/bmalloc.cpp	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/bmalloc.cpp	2018-04-05 18:07:28 UTC (rev 230308)
@@ -52,7 +52,7 @@
 
     void* result;
     {
-        std::lock_guard<StaticMutex> lock(Heap::mutex());
+        std::lock_guard<Mutex> lock(Heap::mutex());
         result = heap.tryAllocateLarge(lock, alignment, size);
     }
 
@@ -65,7 +65,7 @@
 {
     kind = mapToActiveHeapKind(kind);
     Heap& heap = PerProcess<PerHeapKind<Heap>>::get()->at(kind);
-    std::lock_guard<StaticMutex> lock(Heap::mutex());
+    std::lock_guard<Mutex> lock(Heap::mutex());
     heap.deallocateLarge(lock, object);
 }
 
@@ -79,7 +79,7 @@
 bool isEnabled(HeapKind kind)
 {
     kind = mapToActiveHeapKind(kind);
-    std::unique_lock<StaticMutex> lock(Heap::mutex());
+    std::unique_lock<Mutex> lock(Heap::mutex());
     return !PerProcess<PerHeapKind<Heap>>::getFastCase()->at(kind).debugHeap();
 }
 
@@ -86,7 +86,7 @@
 #if BOS(DARWIN)
 void setScavengerThreadQOSClass(qos_class_t overrideClass)
 {
-    std::unique_lock<StaticMutex> lock(Heap::mutex());
+    std::unique_lock<Mutex> lock(Heap::mutex());
     PerProcess<Scavenger>::get()->setScavengerThreadQOSClass(overrideClass);
 }
 #endif

Modified: trunk/Source/bmalloc/bmalloc/bmalloc.h (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc/bmalloc.h	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc/bmalloc.h	2018-04-05 18:07:28 UTC (rev 230308)
@@ -30,9 +30,9 @@
 #include "Gigacage.h"
 #include "Heap.h"
 #include "IsoTLS.h"
+#include "Mutex.h"
 #include "PerHeapKind.h"
 #include "Scavenger.h"
-#include "StaticMutex.h"
 
 namespace bmalloc {
 namespace api {

Modified: trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj (230307 => 230308)


--- trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj	2018-04-05 17:43:35 UTC (rev 230307)
+++ trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj	2018-04-05 18:07:28 UTC (rev 230308)
@@ -86,8 +86,8 @@
 		141D9B001C8E51C0000ABBA0 /* List.h in Headers */ = {isa = PBXBuildFile; fileRef = 141D9AFF1C8E51C0000ABBA0 /* List.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		142B44361E2839E7001DA6E9 /* DebugHeap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 142B44341E2839E7001DA6E9 /* DebugHeap.cpp */; };
 		142B44371E2839E7001DA6E9 /* DebugHeap.h in Headers */ = {isa = PBXBuildFile; fileRef = 142B44351E2839E7001DA6E9 /* DebugHeap.h */; };
-		143CB81C19022BC900B16A45 /* StaticMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143CB81A19022BC900B16A45 /* StaticMutex.cpp */; };
-		143CB81D19022BC900B16A45 /* StaticMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 143CB81B19022BC900B16A45 /* StaticMutex.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		143CB81C19022BC900B16A45 /* Mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143CB81A19022BC900B16A45 /* Mutex.cpp */; };
+		143CB81D19022BC900B16A45 /* Mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 143CB81B19022BC900B16A45 /* Mutex.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1440AFCB1A95261100837FAA /* Zone.h in Headers */ = {isa = PBXBuildFile; fileRef = 1440AFCA1A95261100837FAA /* Zone.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1440AFCD1A9527AF00837FAA /* Zone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1440AFCC1A9527AF00837FAA /* Zone.cpp */; };
 		1448C30018F3754600502839 /* mbmalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1448C2FF18F3754300502839 /* mbmalloc.cpp */; };
@@ -115,7 +115,6 @@
 		14DD78C718F48D7500950702 /* BAssert.h in Headers */ = {isa = PBXBuildFile; fileRef = 1413E468189EEDE400546D68 /* BAssert.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14DD78C818F48D7500950702 /* FixedVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D9DB4517F2447100EAAB79 /* FixedVector.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14DD78C918F48D7500950702 /* BInline.h in Headers */ = {isa = PBXBuildFile; fileRef = 1413E460189DCE1E00546D68 /* BInline.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		14DD78CA18F48D7500950702 /* Mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 144DCED617A649D90093B2F2 /* Mutex.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14DD78CB18F48D7500950702 /* PerProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 14446A0717A61FA400F9EA1D /* PerProcess.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14DD78CC18F48D7500950702 /* PerThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 144469FD17A61F1F00F9EA1D /* PerThread.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14DD78CD18F48D7500950702 /* Range.h in Headers */ = {isa = PBXBuildFile; fileRef = 145F6878179E3A4400D65598 /* Range.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -245,8 +244,8 @@
 		1421A87718EE462A00B4DD68 /* Algorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Algorithm.h; path = bmalloc/Algorithm.h; sourceTree = "<group>"; };
 		142B44341E2839E7001DA6E9 /* DebugHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DebugHeap.cpp; path = bmalloc/DebugHeap.cpp; sourceTree = "<group>"; };
 		142B44351E2839E7001DA6E9 /* DebugHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebugHeap.h; path = bmalloc/DebugHeap.h; sourceTree = "<group>"; };
-		143CB81A19022BC900B16A45 /* StaticMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StaticMutex.cpp; path = bmalloc/StaticMutex.cpp; sourceTree = "<group>"; };
-		143CB81B19022BC900B16A45 /* StaticMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StaticMutex.h; path = bmalloc/StaticMutex.h; sourceTree = "<group>"; };
+		143CB81A19022BC900B16A45 /* Mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mutex.cpp; path = bmalloc/Mutex.cpp; sourceTree = "<group>"; };
+		143CB81B19022BC900B16A45 /* Mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mutex.h; path = bmalloc/Mutex.h; sourceTree = "<group>"; };
 		143E29ED18CAE90500FE8A0F /* SmallPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SmallPage.h; path = bmalloc/SmallPage.h; sourceTree = "<group>"; };
 		1440AFCA1A95261100837FAA /* Zone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Zone.h; path = bmalloc/Zone.h; sourceTree = "<group>"; };
 		1440AFCC1A9527AF00837FAA /* Zone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Zone.cpp; path = bmalloc/Zone.cpp; sourceTree = "<group>"; };
@@ -259,7 +258,6 @@
 		144BE11E1CA346520099C8C0 /* Object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Object.h; path = bmalloc/Object.h; sourceTree = "<group>"; };
 		144C07F21C7B70260051BB6A /* LargeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LargeMap.cpp; path = bmalloc/LargeMap.cpp; sourceTree = "<group>"; };
 		144C07F31C7B70260051BB6A /* LargeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LargeMap.h; path = bmalloc/LargeMap.h; sourceTree = "<group>"; };
-		144DCED617A649D90093B2F2 /* Mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mutex.h; path = bmalloc/Mutex.h; sourceTree = "<group>"; };
 		144F7BFB18BFC517003537F3 /* VMHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VMHeap.cpp; path = bmalloc/VMHeap.cpp; sourceTree = "<group>"; };
 		144F7BFC18BFC517003537F3 /* VMHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VMHeap.h; path = bmalloc/VMHeap.h; sourceTree = "<group>"; };
 		1452478618BC757C00F80098 /* SmallLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SmallLine.h; path = bmalloc/SmallLine.h; sourceTree = "<group>"; };
@@ -406,14 +404,14 @@
 				1448C2FD18F3752B00502839 /* api */,
 				14D9DB4D17F2865C00EAAB79 /* cache */,
 				14B650C418F39F4800751968 /* Configurations */,
+				0F7EB7F91F95414C00F1ABCB /* Frameworks */,
 				14D9DB4E17F2866E00EAAB79 /* heap */,
 				147AAA9C18CE6010002201E4 /* heap: large */,
 				147AAA9A18CE5FD3002201E4 /* heap: small */,
 				0F7EB7FB1F95416900F1ABCB /* iso */,
-				0F7EB7F01F95285300F1ABCB /* test */,
 				145F6840179DC45F00D65598 /* Products */,
 				14D9DB4F17F2868900EAAB79 /* stdlib */,
-				0F7EB7F91F95414C00F1ABCB /* Frameworks */,
+				0F7EB7F01F95285300F1ABCB /* test */,
 			);
 			sourceTree = "<group>";
 		};
@@ -420,9 +418,9 @@
 		145F6840179DC45F00D65598 /* Products */ = {
 			isa = PBXGroup;
 			children = (
+				0F7EB7EF1F95285300F1ABCB /* testbmalloc */,
 				14F271BE18EA3963008C152F /* libbmalloc.a */,
 				14CC394418EA8743004AFE34 /* libmbmalloc.dylib */,
-				0F7EB7EF1F95285300F1ABCB /* testbmalloc */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -505,6 +503,7 @@
 		14D9DB4F17F2868900EAAB79 /* stdlib */ = {
 			isa = PBXGroup;
 			children = (
+				4408F2961C9896C40012EC64 /* darwin */,
 				1421A87718EE462A00B4DD68 /* Algorithm.h */,
 				6599C5CA1EC3F15900A2F7BB /* AvailableMemory.cpp */,
 				6599C5CB1EC3F15900A2F7BB /* AvailableMemory.h */,
@@ -517,7 +516,6 @@
 				14C919C818FCC59F0028DB43 /* BPlatform.h */,
 				0F74B93D1F89713E00B935D3 /* CryptoRandom.cpp */,
 				0F74B93C1F89713E00B935D3 /* CryptoRandom.h */,
-				4408F2961C9896C40012EC64 /* darwin */,
 				14D9DB4517F2447100EAAB79 /* FixedVector.h */,
 				0FD557321F7EDB7B00B1F0A3 /* HeapKind.cpp */,
 				0F5BF1461F22A8B10029D91D /* HeapKind.h */,
@@ -525,15 +523,14 @@
 				4426E27E1C838EE0008EB042 /* Logging.cpp */,
 				4426E27F1C838EE0008EB042 /* Logging.h */,
 				14C8992A1CC485E70027A057 /* Map.h */,
-				144DCED617A649D90093B2F2 /* Mutex.h */,
+				143CB81A19022BC900B16A45 /* Mutex.cpp */,
+				143CB81B19022BC900B16A45 /* Mutex.h */,
+				0F5BF1481F22A8D80029D91D /* PerHeapKind.h */,
 				0F26A7A42054830D0090A141 /* PerProcess.cpp */,
-				0F5BF1481F22A8D80029D91D /* PerHeapKind.h */,
 				14446A0717A61FA400F9EA1D /* PerProcess.h */,
 				144469FD17A61F1F00F9EA1D /* PerThread.h */,
 				145F6878179E3A4400D65598 /* Range.h */,
 				148EFAE61D6B953B008E721E /* ScopeExit.h */,
-				143CB81A19022BC900B16A45 /* StaticMutex.cpp */,
-				143CB81B19022BC900B16A45 /* StaticMutex.h */,
 				1417F64F18B7280C0076FA3F /* Syscall.h */,
 				1479E21217A1A255006D4E9D /* Vector.h */,
 				1479E21417A1A63E006D4E9D /* VMAllocate.h */,
@@ -564,88 +561,87 @@
 			buildActionMask = 2147483647;
 			files = (
 				14DD78C518F48D7500950702 /* Algorithm.h in Headers */,
+				0F7EB8341F9541B000F1ABCB /* AllIsoHeaps.h in Headers */,
+				0F7EB84F1F954D4E00F1ABCB /* AllIsoHeapsInlines.h in Headers */,
 				14DD789818F48D4A00950702 /* Allocator.h in Headers */,
-				0F5BF1531F22E1570029D91D /* Scavenger.h in Headers */,
-				0F7EB8291F9541B000F1ABCB /* FreeListInlines.h in Headers */,
-				0F7EB85A1F955A1100F1ABCB /* DeferredDecommitInlines.h in Headers */,
-				0F7EB8371F9541B000F1ABCB /* IsoDirectory.h in Headers */,
-				0F5BF1471F22A8B10029D91D /* HeapKind.h in Headers */,
 				6599C5CD1EC3F15900A2F7BB /* AvailableMemory.h in Headers */,
-				0F7EB8451F9541B000F1ABCB /* IsoHeapImpl.h in Headers */,
 				14DD78C718F48D7500950702 /* BAssert.h in Headers */,
+				AD0934331FCF406D00E85EB5 /* BCompiler.h in Headers */,
+				0F5BF1731F23C5710029D91D /* BExport.h in Headers */,
+				14DD78C918F48D7500950702 /* BInline.h in Headers */,
+				0F7EB84C1F9541C700F1ABCB /* Bits.h in Headers */,
 				1448C30118F3754C00502839 /* bmalloc.h in Headers */,
-				0F7EB8381F9541B000F1ABCB /* EligibilityResultInlines.h in Headers */,
+				0F7EB84D1F9541C700F1ABCB /* BMalloced.h in Headers */,
 				14C919C918FCC59F0028DB43 /* BPlatform.h in Headers */,
 				4426E2831C839547008EB042 /* BSoftLinking.h in Headers */,
-				0F7EB8461F9541B000F1ABCB /* IsoTLSInlines.h in Headers */,
-				0F7EB8421F9541B000F1ABCB /* IsoTLS.h in Headers */,
-				0F7EB84F1F954D4E00F1ABCB /* AllIsoHeapsInlines.h in Headers */,
 				14DD789C18F48D4A00950702 /* BumpAllocator.h in Headers */,
-				0F7EB8231F9541B000F1ABCB /* EligibilityResult.h in Headers */,
-				0F74B93E1F89713E00B935D3 /* CryptoRandom.h in Headers */,
 				140FA00319CE429C00FFD3C8 /* BumpRange.h in Headers */,
 				14DD789918F48D4A00950702 /* Cache.h in Headers */,
 				147DC6E31CA5B70B00724E8D /* Chunk.h in Headers */,
-				0F7EB82C1F9541B000F1ABCB /* IsoHeap.h in Headers */,
-				0F5BF1731F23C5710029D91D /* BExport.h in Headers */,
-				0F7EB83C1F9541B000F1ABCB /* IsoAllocator.h in Headers */,
-				0F7EB8431F9541B000F1ABCB /* IsoTLSAllocatorEntry.h in Headers */,
+				0F74B93E1F89713E00B935D3 /* CryptoRandom.h in Headers */,
 				14DD789A18F48D4A00950702 /* Deallocator.h in Headers */,
-				0F7EB8491F9541B000F1ABCB /* IsoDirectoryPage.h in Headers */,
-				0F7EB8281F9541B000F1ABCB /* IsoDirectoryInlines.h in Headers */,
+				142B44371E2839E7001DA6E9 /* DebugHeap.h in Headers */,
+				0F7EB83D1F9541B000F1ABCB /* DeferredDecommit.h in Headers */,
+				0F7EB85A1F955A1100F1ABCB /* DeferredDecommitInlines.h in Headers */,
+				0F7EB8391F9541B000F1ABCB /* DeferredTrigger.h in Headers */,
 				0F7EB8251F9541B000F1ABCB /* DeferredTriggerInlines.h in Headers */,
-				142B44371E2839E7001DA6E9 /* DebugHeap.h in Headers */,
-				0F7EB84C1F9541C700F1ABCB /* Bits.h in Headers */,
+				0F7EB8231F9541B000F1ABCB /* EligibilityResult.h in Headers */,
+				0F7EB8381F9541B000F1ABCB /* EligibilityResultInlines.h in Headers */,
 				14895D921A3A319C0006235D /* Environment.h in Headers */,
 				14DD78C818F48D7500950702 /* FixedVector.h in Headers */,
+				0F7EB8441F9541B000F1ABCB /* FreeList.h in Headers */,
+				0F7EB8291F9541B000F1ABCB /* FreeListInlines.h in Headers */,
+				0F5BF14D1F22B0C30029D91D /* Gigacage.h in Headers */,
 				1400274918F89C1300115C97 /* Heap.h in Headers */,
+				0F5BF1471F22A8B10029D91D /* HeapKind.h in Headers */,
+				0F7EB83C1F9541B000F1ABCB /* IsoAllocator.h in Headers */,
+				0F7EB8261F9541B000F1ABCB /* IsoAllocatorInlines.h in Headers */,
+				0F7EB8411F9541B000F1ABCB /* IsoConfig.h in Headers */,
+				0F7EB8471F9541B000F1ABCB /* IsoDeallocator.h in Headers */,
+				0F7EB83A1F9541B000F1ABCB /* IsoDeallocatorInlines.h in Headers */,
+				0F7EB8371F9541B000F1ABCB /* IsoDirectory.h in Headers */,
+				0F7EB8281F9541B000F1ABCB /* IsoDirectoryInlines.h in Headers */,
+				0F7EB8491F9541B000F1ABCB /* IsoDirectoryPage.h in Headers */,
+				0F7EB82A1F9541B000F1ABCB /* IsoDirectoryPageInlines.h in Headers */,
+				0F7EB82C1F9541B000F1ABCB /* IsoHeap.h in Headers */,
+				0F7EB8451F9541B000F1ABCB /* IsoHeapImpl.h in Headers */,
+				0F7EB8241F9541B000F1ABCB /* IsoHeapImplInlines.h in Headers */,
+				0F7EB8301F9541B000F1ABCB /* IsoHeapInlines.h in Headers */,
+				0F7EB82E1F9541B000F1ABCB /* IsoPage.h in Headers */,
+				0F7EB8311F9541B000F1ABCB /* IsoPageInlines.h in Headers */,
+				0F7EB82B1F9541B000F1ABCB /* IsoPageTrigger.h in Headers */,
+				0F7EB8421F9541B000F1ABCB /* IsoTLS.h in Headers */,
+				0F7EB8431F9541B000F1ABCB /* IsoTLSAllocatorEntry.h in Headers */,
 				0F7EB8481F9541B000F1ABCB /* IsoTLSAllocatorEntryInlines.h in Headers */,
-				0F7EB84D1F9541C700F1ABCB /* BMalloced.h in Headers */,
-				0F7EB82A1F9541B000F1ABCB /* IsoDirectoryPageInlines.h in Headers */,
-				0F5BF1491F22A8D80029D91D /* PerHeapKind.h in Headers */,
+				0F7EB8331F9541B000F1ABCB /* IsoTLSDeallocatorEntry.h in Headers */,
+				0F7EB8271F9541B000F1ABCB /* IsoTLSDeallocatorEntryInlines.h in Headers */,
 				0F7EB82D1F9541B000F1ABCB /* IsoTLSEntry.h in Headers */,
-				14DD78C918F48D7500950702 /* BInline.h in Headers */,
-				0F7EB8471F9541B000F1ABCB /* IsoDeallocator.h in Headers */,
-				0F7EB8241F9541B000F1ABCB /* IsoHeapImplInlines.h in Headers */,
-				795AB3C7206E0D340074FE76 /* PhysicalPageMap.h in Headers */,
+				0F7EB8351F9541B000F1ABCB /* IsoTLSEntryInlines.h in Headers */,
+				0F7EB8461F9541B000F1ABCB /* IsoTLSInlines.h in Headers */,
+				0F7EB8401F9541B000F1ABCB /* IsoTLSLayout.h in Headers */,
 				144C07F51C7B70260051BB6A /* LargeMap.h in Headers */,
 				14C8992D1CC578330027A057 /* LargeRange.h in Headers */,
 				140FA00519CE4B6800FFD3C8 /* LineMetadata.h in Headers */,
-				0F7EB8331F9541B000F1ABCB /* IsoTLSDeallocatorEntry.h in Headers */,
 				141D9B001C8E51C0000ABBA0 /* List.h in Headers */,
 				4426E2811C838EE0008EB042 /* Logging.h in Headers */,
-				0F7EB82E1F9541B000F1ABCB /* IsoPage.h in Headers */,
-				0F7EB83D1F9541B000F1ABCB /* DeferredDecommit.h in Headers */,
-				0F7EB8351F9541B000F1ABCB /* IsoTLSEntryInlines.h in Headers */,
-				0F7EB8301F9541B000F1ABCB /* IsoHeapInlines.h in Headers */,
 				14C8992B1CC485E70027A057 /* Map.h in Headers */,
-				14DD78CA18F48D7500950702 /* Mutex.h in Headers */,
+				143CB81D19022BC900B16A45 /* Mutex.h in Headers */,
 				144BE11F1CA346520099C8C0 /* Object.h in Headers */,
 				14DD789318F48D0F00950702 /* ObjectType.h in Headers */,
+				0F5BF1491F22A8D80029D91D /* PerHeapKind.h in Headers */,
 				14DD78CB18F48D7500950702 /* PerProcess.h in Headers */,
-				0F7EB8261F9541B000F1ABCB /* IsoAllocatorInlines.h in Headers */,
 				14DD78CC18F48D7500950702 /* PerThread.h in Headers */,
+				795AB3C7206E0D340074FE76 /* PhysicalPageMap.h in Headers */,
+				AD14AD29202529C400890E3B /* ProcessCheck.h in Headers */,
 				14DD78CD18F48D7500950702 /* Range.h in Headers */,
-				0F7EB8441F9541B000F1ABCB /* FreeList.h in Headers */,
+				0F5BF1531F22E1570029D91D /* Scavenger.h in Headers */,
 				148EFAE81D6B953B008E721E /* ScopeExit.h in Headers */,
-				0F7EB8341F9541B000F1ABCB /* AllIsoHeaps.h in Headers */,
-				0F7EB8401F9541B000F1ABCB /* IsoTLSLayout.h in Headers */,
-				0F7EB8391F9541B000F1ABCB /* DeferredTrigger.h in Headers */,
 				14DD789018F48CEB00950702 /* Sizes.h in Headers */,
-				0F7EB8411F9541B000F1ABCB /* IsoConfig.h in Headers */,
-				AD0934331FCF406D00E85EB5 /* BCompiler.h in Headers */,
-				0F7EB8311F9541B000F1ABCB /* IsoPageInlines.h in Headers */,
 				14DD78BC18F48D6B00950702 /* SmallLine.h in Headers */,
-				0F7EB82B1F9541B000F1ABCB /* IsoPageTrigger.h in Headers */,
 				14DD78BD18F48D6B00950702 /* SmallPage.h in Headers */,
-				143CB81D19022BC900B16A45 /* StaticMutex.h in Headers */,
-				0F7EB8271F9541B000F1ABCB /* IsoTLSDeallocatorEntryInlines.h in Headers */,
 				14DD78CE18F48D7500950702 /* Syscall.h in Headers */,
-				0F5BF14D1F22B0C30029D91D /* Gigacage.h in Headers */,
 				14DD78CF18F48D7500950702 /* Vector.h in Headers */,
 				14DD78D018F48D7500950702 /* VMAllocate.h in Headers */,
-				0F7EB83A1F9541B000F1ABCB /* IsoDeallocatorInlines.h in Headers */,
-				AD14AD29202529C400890E3B /* ProcessCheck.h in Headers */,
 				1400274A18F89C2300115C97 /* VMHeap.h in Headers */,
 				1440AFCB1A95261100837FAA /* Zone.h in Headers */,
 			);
@@ -767,32 +763,32 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				0F5BF1521F22E1570029D91D /* Scavenger.cpp in Sources */,
-				0F7EB8361F9541B000F1ABCB /* IsoTLS.cpp in Sources */,
-				0FD557331F7EDB7B00B1F0A3 /* HeapKind.cpp in Sources */,
-				0F7EB83B1F9541B000F1ABCB /* IsoHeapImpl.cpp in Sources */,
-				0F5549EF1FB54704007FF75A /* IsoPage.cpp in Sources */,
+				0F7EB82F1F9541B000F1ABCB /* AllIsoHeaps.cpp in Sources */,
 				14F271C318EA3978008C152F /* Allocator.cpp in Sources */,
 				6599C5CC1EC3F15900A2F7BB /* AvailableMemory.cpp in Sources */,
+				0F5167741FAD685C008236A8 /* bmalloc.cpp in Sources */,
 				14F271C418EA397B008C152F /* Cache.cpp in Sources */,
-				0F26A7A5205483130090A141 /* PerProcess.cpp in Sources */,
+				0F74B93F1F89713E00B935D3 /* CryptoRandom.cpp in Sources */,
 				14F271C518EA397E008C152F /* Deallocator.cpp in Sources */,
 				142B44361E2839E7001DA6E9 /* DebugHeap.cpp in Sources */,
 				14895D911A3A319C0006235D /* Environment.cpp in Sources */,
-				0F7EB83F1F9541B000F1ABCB /* IsoTLSLayout.cpp in Sources */,
-				AD14AD2A202529C700890E3B /* ProcessCheck.mm in Sources */,
+				0F7EB83E1F9541B000F1ABCB /* FreeList.cpp in Sources */,
+				0F5BF14F1F22DEAF0029D91D /* Gigacage.cpp in Sources */,
 				14F271C718EA3990008C152F /* Heap.cpp in Sources */,
+				0FD557331F7EDB7B00B1F0A3 /* HeapKind.cpp in Sources */,
+				0F7EB83B1F9541B000F1ABCB /* IsoHeapImpl.cpp in Sources */,
+				0F5549EF1FB54704007FF75A /* IsoPage.cpp in Sources */,
+				0F7EB8361F9541B000F1ABCB /* IsoTLS.cpp in Sources */,
 				0F7EB8321F9541B000F1ABCB /* IsoTLSEntry.cpp in Sources */,
-				0F74B93F1F89713E00B935D3 /* CryptoRandom.cpp in Sources */,
-				0F5BF14F1F22DEAF0029D91D /* Gigacage.cpp in Sources */,
+				0F7EB83F1F9541B000F1ABCB /* IsoTLSLayout.cpp in Sources */,
 				144C07F41C7B70260051BB6A /* LargeMap.cpp in Sources */,
-				0F7EB83E1F9541B000F1ABCB /* FreeList.cpp in Sources */,
 				4426E2801C838EE0008EB042 /* Logging.cpp in Sources */,
-				0F7EB82F1F9541B000F1ABCB /* AllIsoHeaps.cpp in Sources */,
+				143CB81C19022BC900B16A45 /* Mutex.cpp in Sources */,
 				14F271C818EA3990008C152F /* ObjectType.cpp in Sources */,
-				143CB81C19022BC900B16A45 /* StaticMutex.cpp in Sources */,
+				0F26A7A5205483130090A141 /* PerProcess.cpp in Sources */,
+				AD14AD2A202529C700890E3B /* ProcessCheck.mm in Sources */,
+				0F5BF1521F22E1570029D91D /* Scavenger.cpp in Sources */,
 				14F271C918EA3990008C152F /* VMHeap.cpp in Sources */,
-				0F5167741FAD685C008236A8 /* bmalloc.cpp in Sources */,
 				1440AFCD1A9527AF00837FAA /* Zone.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to