bmalloc: Refactored SegregatedFreeList and BoundaryTag::init
[WebKit-https.git] / Source / bmalloc / bmalloc / VMHeap.cpp
index d71449b..2d5136d 100644 (file)
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#include "BoundaryTagInlines.h"
-#include "LargeChunk.h"
+#include "LargeObject.h"
 #include "Line.h"
 #include "PerProcess.h"
 #include "SuperChunk.h"
@@ -40,7 +39,9 @@ VMHeap::VMHeap()
 void VMHeap::grow()
 {
     SuperChunk* superChunk = SuperChunk::create();
-    m_superChunks.push(superChunk);
+#if BPLATFORM(DARWIN)
+    m_zone.addSuperChunk(superChunk);
+#endif
 
     SmallChunk* smallChunk = superChunk->smallChunk();
     for (auto* it = smallChunk->begin(); it != smallChunk->end(); ++it)
@@ -51,7 +52,7 @@ void VMHeap::grow()
         m_mediumPages.push(it);
 
     LargeChunk* largeChunk = superChunk->largeChunk();
-    m_largeRanges.insert(BoundaryTag::init(largeChunk));
+    m_largeObjects.insert(LargeObject(LargeObject::init(largeChunk).begin()));
 }
 
 } // namespace bmalloc