<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196845] trunk/Source/bmalloc</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196845">196845</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2016-02-19 16:03:56 -0800 (Fri, 19 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>bmalloc: Remove the concept of medium objects
https://bugs.webkit.org/show_bug.cgi?id=154436

Reviewed by Sam Weinig.

There's no need to distinguish medium objects from small: Small object
metadata works naturally for both as long as we allow an object to
span more than two small lines. (We already allow an object to span
more than one small line.)

This change reduces memory use because it eliminates the 1kB line size,
so we don't have to hold down 1kB lines for individual 264+ byte objects.

1kB lines were always a bit of a compromise. The main point of bump
allocation is to take advantage of cache lines. Cache lines are usually
64 bytes, so line sizes above 256 bytes are a bit of a stretch.

This change speeds up small object benchmarks because it eliminates the
branch to detect medium objects in deallocation log processing.

This change reduces virtual memory use from worst cast 4X to worst case
2X because the medium chunk is gone. iOS cares about virtual memory use
and terminates apps above ~1GB, so this change gives us more breathing room.

This change slows down medium benchmarks a bit because we end up doing
more work to recycle fragmented medium objects. Overall, the tradeoff
seems justified, since we have a net speedup and a memory use savings.

* bmalloc.xcodeproj/project.pbxproj: Removed all the medium files. We
can simplify even further in a follow-up patch, removing the base class
templates for Chunk, Page, and Line as well.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::Allocator):
(bmalloc::Allocator::allocate):
(bmalloc::Allocator::reallocate):
(bmalloc::Allocator::scavenge):
(bmalloc::Allocator::refillAllocatorSlowCase):
(bmalloc::Allocator::refillAllocator):
(bmalloc::Allocator::allocateSlowCase): Medium is gone. Small max is the
new medium max.

* bmalloc/Allocator.h:
(bmalloc::Allocator::allocateFastCase): Ditto.

* bmalloc/BumpAllocator.h:
(bmalloc::BumpAllocator::validate):
(bmalloc::BumpAllocator::allocate): No more medium.

* bmalloc/Chunk.h: No more medium.

* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::processObjectLog): No check for medium. This is
a speedup.

(bmalloc::Deallocator::deallocateSlowCase): No more medium.

* bmalloc/Deallocator.h:
(bmalloc::Deallocator::deallocateFastCase): Ditto.

* bmalloc/Heap.cpp:
(bmalloc::Heap::initializeLineMetadata): The algorithm here changed from
iterating each line to iterating each object. This helps us accomodate
objects that might span more than two lines -- i.e., all objects between
(512 bytes, 1024 bytes].

(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeSmallPages):
(bmalloc::Heap::scavengeLargeObjects): Medium is gone.

(bmalloc::Heap::allocateSmallBumpRanges): Allow for lines that allocate
zero objects. This happens when an object spans more than two lines --
the middle lines allocate zero objects.

Also set the &quot;has free lines&quot; bit to false if we consume the last free
line. This needs to be a bit now because not all pages agree on their
maximum refcount anymore, so we need an explicit signal for the transition
from maximum to maximum - 1.

(bmalloc::Heap::allocateSmallPage): This code didn't change; I just removed
the medium code.

(bmalloc::Heap::deallocateSmallLine): Changed the algorithm to check
hasFreeLines. See allocateSmallBumpRanges.

(bmalloc::Heap::scavengeMediumPages): Deleted.
(bmalloc::Heap::allocateMediumBumpRanges): Deleted.
(bmalloc::Heap::allocateMediumPage): Deleted.
(bmalloc::Heap::deallocateMediumLine): Deleted.
* bmalloc/Heap.h:
(bmalloc::Heap::derefMediumLine): Deleted.

* bmalloc/LargeChunk.h:
(bmalloc::LargeChunk::get):
(bmalloc::LargeChunk::endTag):
* bmalloc/Line.h: No more medium.

* bmalloc/MediumChunk.h: Removed.
* bmalloc/MediumLine.h: Removed.
* bmalloc/MediumPage.h: Removed.
* bmalloc/MediumTraits.h: Removed.

* bmalloc/ObjectType.cpp:
(bmalloc::objectType):
* bmalloc/ObjectType.h:
(bmalloc::isSmall):
(bmalloc::isXLarge):
(bmalloc::isSmallOrMedium): Deleted.
(bmalloc::isMedium): Deleted. No more medium.

* bmalloc/Page.h:
(bmalloc::Page::sizeClass):
(bmalloc::Page::setSizeClass):
(bmalloc::Page::hasFreeLines):
(bmalloc::Page::setHasFreeLines): Add the free lines bit. You get better
codegen if you make it the low bit, since ref / deref can then add / sub
2. So do that.

* bmalloc/Sizes.h:
(bmalloc::Sizes::sizeClass): Expand the small size class to include the
medium size class.

* bmalloc/SuperChunk.h:
(bmalloc::SuperChunk::SuperChunk):
(bmalloc::SuperChunk::smallChunk):
(bmalloc::SuperChunk::largeChunk):
(bmalloc::SuperChunk::mediumChunk): Deleted. No more medium.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::grow):
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateSmallPage): Set the has free lines bit before
returning a Page to the Heap since this is the correct default state
when we first allocate a page.

(bmalloc::VMHeap::allocateMediumPage): Deleted.
(bmalloc::VMHeap::deallocateMediumPage): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourcebmallocChangeLog">trunk/Source/bmalloc/ChangeLog</a></li>
<li><a href="#trunkSourcebmallocbmallocAllocatorcpp">trunk/Source/bmalloc/bmalloc/Allocator.cpp</a></li>
<li><a href="#trunkSourcebmallocbmallocAllocatorh">trunk/Source/bmalloc/bmalloc/Allocator.h</a></li>
<li><a href="#trunkSourcebmallocbmallocBumpAllocatorh">trunk/Source/bmalloc/bmalloc/BumpAllocator.h</a></li>
<li><a href="#trunkSourcebmallocbmallocChunkh">trunk/Source/bmalloc/bmalloc/Chunk.h</a></li>
<li><a href="#trunkSourcebmallocbmallocDeallocatorcpp">trunk/Source/bmalloc/bmalloc/Deallocator.cpp</a></li>
<li><a href="#trunkSourcebmallocbmallocDeallocatorh">trunk/Source/bmalloc/bmalloc/Deallocator.h</a></li>
<li><a href="#trunkSourcebmallocbmallocHeapcpp">trunk/Source/bmalloc/bmalloc/Heap.cpp</a></li>
<li><a href="#trunkSourcebmallocbmallocHeaph">trunk/Source/bmalloc/bmalloc/Heap.h</a></li>
<li><a href="#trunkSourcebmallocbmallocLargeChunkh">trunk/Source/bmalloc/bmalloc/LargeChunk.h</a></li>
<li><a href="#trunkSourcebmallocbmallocLineh">trunk/Source/bmalloc/bmalloc/Line.h</a></li>
<li><a href="#trunkSourcebmallocbmallocObjectTypecpp">trunk/Source/bmalloc/bmalloc/ObjectType.cpp</a></li>
<li><a href="#trunkSourcebmallocbmallocObjectTypeh">trunk/Source/bmalloc/bmalloc/ObjectType.h</a></li>
<li><a href="#trunkSourcebmallocbmallocPageh">trunk/Source/bmalloc/bmalloc/Page.h</a></li>
<li><a href="#trunkSourcebmallocbmallocSizesh">trunk/Source/bmalloc/bmalloc/Sizes.h</a></li>
<li><a href="#trunkSourcebmallocbmallocSuperChunkh">trunk/Source/bmalloc/bmalloc/SuperChunk.h</a></li>
<li><a href="#trunkSourcebmallocbmallocVMHeapcpp">trunk/Source/bmalloc/bmalloc/VMHeap.cpp</a></li>
<li><a href="#trunkSourcebmallocbmallocVMHeaph">trunk/Source/bmalloc/bmalloc/VMHeap.h</a></li>
<li><a href="#trunkSourcebmallocbmallocxcodeprojprojectpbxproj">trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourcebmallocbmallocMediumChunkh">trunk/Source/bmalloc/bmalloc/MediumChunk.h</a></li>
<li><a href="#trunkSourcebmallocbmallocMediumLineh">trunk/Source/bmalloc/bmalloc/MediumLine.h</a></li>
<li><a href="#trunkSourcebmallocbmallocMediumPageh">trunk/Source/bmalloc/bmalloc/MediumPage.h</a></li>
<li><a href="#trunkSourcebmallocbmallocMediumTraitsh">trunk/Source/bmalloc/bmalloc/MediumTraits.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourcebmallocChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/ChangeLog (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/ChangeLog        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/ChangeLog        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -1,3 +1,143 @@
</span><ins>+2016-02-18  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        bmalloc: Remove the concept of medium objects
+        https://bugs.webkit.org/show_bug.cgi?id=154436
+
+        Reviewed by Sam Weinig.
+
+        There's no need to distinguish medium objects from small: Small object
+        metadata works naturally for both as long as we allow an object to
+        span more than two small lines. (We already allow an object to span
+        more than one small line.)
+
+        This change reduces memory use because it eliminates the 1kB line size,
+        so we don't have to hold down 1kB lines for individual 264+ byte objects.
+
+        1kB lines were always a bit of a compromise. The main point of bump
+        allocation is to take advantage of cache lines. Cache lines are usually
+        64 bytes, so line sizes above 256 bytes are a bit of a stretch.
+
+        This change speeds up small object benchmarks because it eliminates the
+        branch to detect medium objects in deallocation log processing.
+
+        This change reduces virtual memory use from worst cast 4X to worst case
+        2X because the medium chunk is gone. iOS cares about virtual memory use
+        and terminates apps above ~1GB, so this change gives us more breathing room.
+
+        This change slows down medium benchmarks a bit because we end up doing
+        more work to recycle fragmented medium objects. Overall, the tradeoff
+        seems justified, since we have a net speedup and a memory use savings.
+
+        * bmalloc.xcodeproj/project.pbxproj: Removed all the medium files. We
+        can simplify even further in a follow-up patch, removing the base class
+        templates for Chunk, Page, and Line as well.
+
+        * bmalloc/Allocator.cpp:
+        (bmalloc::Allocator::Allocator):
+        (bmalloc::Allocator::allocate):
+        (bmalloc::Allocator::reallocate):
+        (bmalloc::Allocator::scavenge):
+        (bmalloc::Allocator::refillAllocatorSlowCase):
+        (bmalloc::Allocator::refillAllocator):
+        (bmalloc::Allocator::allocateSlowCase): Medium is gone. Small max is the
+        new medium max.
+
+        * bmalloc/Allocator.h:
+        (bmalloc::Allocator::allocateFastCase): Ditto.
+
+        * bmalloc/BumpAllocator.h:
+        (bmalloc::BumpAllocator::validate):
+        (bmalloc::BumpAllocator::allocate): No more medium.
+
+        * bmalloc/Chunk.h: No more medium.
+
+        * bmalloc/Deallocator.cpp:
+        (bmalloc::Deallocator::processObjectLog): No check for medium. This is
+        a speedup.
+
+        (bmalloc::Deallocator::deallocateSlowCase): No more medium.
+
+        * bmalloc/Deallocator.h:
+        (bmalloc::Deallocator::deallocateFastCase): Ditto.
+
+        * bmalloc/Heap.cpp:
+        (bmalloc::Heap::initializeLineMetadata): The algorithm here changed from
+        iterating each line to iterating each object. This helps us accomodate
+        objects that might span more than two lines -- i.e., all objects between
+        (512 bytes, 1024 bytes].
+
+        (bmalloc::Heap::scavenge):
+        (bmalloc::Heap::scavengeSmallPages):
+        (bmalloc::Heap::scavengeLargeObjects): Medium is gone.
+
+        (bmalloc::Heap::allocateSmallBumpRanges): Allow for lines that allocate
+        zero objects. This happens when an object spans more than two lines --
+        the middle lines allocate zero objects.
+
+        Also set the &quot;has free lines&quot; bit to false if we consume the last free
+        line. This needs to be a bit now because not all pages agree on their
+        maximum refcount anymore, so we need an explicit signal for the transition
+        from maximum to maximum - 1.
+
+        (bmalloc::Heap::allocateSmallPage): This code didn't change; I just removed
+        the medium code.
+
+        (bmalloc::Heap::deallocateSmallLine): Changed the algorithm to check
+        hasFreeLines. See allocateSmallBumpRanges.
+
+        (bmalloc::Heap::scavengeMediumPages): Deleted.
+        (bmalloc::Heap::allocateMediumBumpRanges): Deleted.
+        (bmalloc::Heap::allocateMediumPage): Deleted.
+        (bmalloc::Heap::deallocateMediumLine): Deleted.
+        * bmalloc/Heap.h:
+        (bmalloc::Heap::derefMediumLine): Deleted.
+
+        * bmalloc/LargeChunk.h:
+        (bmalloc::LargeChunk::get):
+        (bmalloc::LargeChunk::endTag):
+        * bmalloc/Line.h: No more medium.
+
+        * bmalloc/MediumChunk.h: Removed.
+        * bmalloc/MediumLine.h: Removed.
+        * bmalloc/MediumPage.h: Removed.
+        * bmalloc/MediumTraits.h: Removed.
+
+        * bmalloc/ObjectType.cpp:
+        (bmalloc::objectType):
+        * bmalloc/ObjectType.h:
+        (bmalloc::isSmall):
+        (bmalloc::isXLarge):
+        (bmalloc::isSmallOrMedium): Deleted.
+        (bmalloc::isMedium): Deleted. No more medium.
+
+        * bmalloc/Page.h:
+        (bmalloc::Page::sizeClass):
+        (bmalloc::Page::setSizeClass):
+        (bmalloc::Page::hasFreeLines):
+        (bmalloc::Page::setHasFreeLines): Add the free lines bit. You get better
+        codegen if you make it the low bit, since ref / deref can then add / sub
+        2. So do that.
+
+        * bmalloc/Sizes.h:
+        (bmalloc::Sizes::sizeClass): Expand the small size class to include the
+        medium size class.
+
+        * bmalloc/SuperChunk.h:
+        (bmalloc::SuperChunk::SuperChunk):
+        (bmalloc::SuperChunk::smallChunk):
+        (bmalloc::SuperChunk::largeChunk):
+        (bmalloc::SuperChunk::mediumChunk): Deleted. No more medium.
+
+        * bmalloc/VMHeap.cpp:
+        (bmalloc::VMHeap::grow):
+        * bmalloc/VMHeap.h:
+        (bmalloc::VMHeap::allocateSmallPage): Set the has free lines bit before
+        returning a Page to the Heap since this is the correct default state
+        when we first allocate a page.
+
+        (bmalloc::VMHeap::allocateMediumPage): Deleted.
+        (bmalloc::VMHeap::deallocateMediumPage): Deleted.
+
</ins><span class="cx"> 2016-02-19  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         bmalloc: Unify VMHeap and Heap LargeObjects free lists to reduce fragmentation
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocAllocatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Allocator.cpp (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Allocator.cpp        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Allocator.cpp        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     : m_isBmallocEnabled(heap-&gt;environment().isBmallocEnabled())
</span><span class="cx">     , m_deallocator(deallocator)
</span><span class="cx"> {
</span><del>-    for (unsigned short size = alignment; size &lt;= mediumMax; size += alignment)
</del><ins>+    for (unsigned short size = alignment; size &lt;= smallMax; size += alignment)
</ins><span class="cx">         m_bumpAllocators[sizeClass(size)].init(size);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -87,16 +87,6 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (size &lt;= mediumMax &amp;&amp; alignment &lt;= mediumLineSize) {
-        size = std::max(size, smallMax + Sizes::alignment);
-        size_t alignmentMask = alignment - 1;
-        while (void* p = allocate(size)) {
-            if (!test(p, alignmentMask))
-                return p;
-            m_deallocator.deallocate(p);
-        }
-    }
-
</del><span class="cx">     if (size &lt;= largeMax &amp;&amp; alignment &lt;= largeMax) {
</span><span class="cx">         size = std::max(largeMin, roundUpToMultipleOf&lt;largeAlignment&gt;(size));
</span><span class="cx">         alignment = roundUpToMultipleOf&lt;largeAlignment&gt;(alignment);
</span><span class="lines">@@ -130,17 +120,12 @@
</span><span class="cx">         oldSize = objectSize(page-&gt;sizeClass());
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    case Medium: {
-        MediumPage* page = MediumPage::get(MediumLine::get(object));
-        oldSize = objectSize(page-&gt;sizeClass());
-        break;
-    }
</del><span class="cx">     case Large: {
</span><span class="cx">         std::unique_lock&lt;StaticMutex&gt; lock(PerProcess&lt;Heap&gt;::mutex());
</span><span class="cx">         LargeObject largeObject(object);
</span><span class="cx">         oldSize = largeObject.size();
</span><span class="cx"> 
</span><del>-        if (newSize &lt; oldSize &amp;&amp; newSize &gt; mediumMax) {
</del><ins>+        if (newSize &lt; oldSize &amp;&amp; newSize &gt; smallMax) {
</ins><span class="cx">             newSize = roundUpToMultipleOf&lt;largeAlignment&gt;(newSize);
</span><span class="cx">             if (oldSize - newSize &gt;= largeMin) {
</span><span class="cx">                 std::pair&lt;LargeObject, LargeObject&gt; split = largeObject.split(newSize);
</span><span class="lines">@@ -202,7 +187,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Allocator::scavenge()
</span><span class="cx"> {
</span><del>-    for (unsigned short i = alignment; i &lt;= mediumMax; i += alignment) {
</del><ins>+    for (unsigned short i = alignment; i &lt;= smallMax; i += alignment) {
</ins><span class="cx">         BumpAllocator&amp; allocator = m_bumpAllocators[sizeClass(i)];
</span><span class="cx">         BumpRangeCache&amp; bumpRangeCache = m_bumpRangeCaches[sizeClass(i)];
</span><span class="cx"> 
</span><span class="lines">@@ -224,10 +209,7 @@
</span><span class="cx">     BumpRangeCache&amp; bumpRangeCache = m_bumpRangeCaches[sizeClass];
</span><span class="cx"> 
</span><span class="cx">     std::lock_guard&lt;StaticMutex&gt; lock(PerProcess&lt;Heap&gt;::mutex());
</span><del>-    if (sizeClass &lt;= bmalloc::sizeClass(smallMax))
-        PerProcess&lt;Heap&gt;::getFastCase()-&gt;allocateSmallBumpRanges(lock, sizeClass, allocator, bumpRangeCache);
-    else
-        PerProcess&lt;Heap&gt;::getFastCase()-&gt;allocateMediumBumpRanges(lock, sizeClass, allocator, bumpRangeCache);
</del><ins>+    PerProcess&lt;Heap&gt;::getFastCase()-&gt;allocateSmallBumpRanges(lock, sizeClass, allocator, bumpRangeCache);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> INLINE void Allocator::refillAllocator(BumpAllocator&amp; allocator, size_t sizeClass)
</span><span class="lines">@@ -257,7 +239,7 @@
</span><span class="cx">     if (!m_isBmallocEnabled)
</span><span class="cx">         return malloc(size);
</span><span class="cx"> 
</span><del>-    if (size &lt;= mediumMax) {
</del><ins>+    if (size &lt;= smallMax) {
</ins><span class="cx">         size_t sizeClass = bmalloc::sizeClass(size);
</span><span class="cx">         BumpAllocator&amp; allocator = m_bumpAllocators[sizeClass];
</span><span class="cx">         refillAllocator(allocator, sizeClass);
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocAllocatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Allocator.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Allocator.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Allocator.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -52,15 +52,14 @@
</span><span class="cx">     bool allocateFastCase(size_t, void*&amp;);
</span><span class="cx">     void* allocateSlowCase(size_t);
</span><span class="cx">     
</span><del>-    void* allocateMedium(size_t);
</del><span class="cx">     void* allocateLarge(size_t);
</span><span class="cx">     void* allocateXLarge(size_t);
</span><span class="cx">     
</span><span class="cx">     void refillAllocator(BumpAllocator&amp;, size_t sizeClass);
</span><span class="cx">     void refillAllocatorSlowCase(BumpAllocator&amp;, size_t sizeClass);
</span><span class="cx">     
</span><del>-    std::array&lt;BumpAllocator, mediumMax / alignment&gt; m_bumpAllocators;
-    std::array&lt;BumpRangeCache, mediumMax / alignment&gt; m_bumpRangeCaches;
</del><ins>+    std::array&lt;BumpAllocator, smallMax / alignment&gt; m_bumpAllocators;
+    std::array&lt;BumpRangeCache, smallMax / alignment&gt; m_bumpRangeCaches;
</ins><span class="cx"> 
</span><span class="cx">     bool m_isBmallocEnabled;
</span><span class="cx">     Deallocator&amp; m_deallocator;
</span><span class="lines">@@ -68,7 +67,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool Allocator::allocateFastCase(size_t size, void*&amp; object)
</span><span class="cx"> {
</span><del>-    if (size &gt; mediumMax)
</del><ins>+    if (size &gt; smallMax)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     BumpAllocator&amp; allocator = m_bumpAllocators[sizeClass(size)];
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocBumpAllocatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/BumpAllocator.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/BumpAllocator.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/BumpAllocator.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace bmalloc {
</span><span class="cx"> 
</span><del>-// Helper object for allocating small and medium objects.
</del><ins>+// Helper object for allocating small objects.
</ins><span class="cx"> 
</span><span class="cx"> class BumpAllocator {
</span><span class="cx"> public:
</span><span class="lines">@@ -79,8 +79,8 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    BASSERT(m_size &lt;= mediumMax);
-    BASSERT(isMedium(ptr));
</del><ins>+    BASSERT(m_size &lt;= smallMax);
+    BASSERT(isSmall(ptr));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void* BumpAllocator::allocate()
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocChunkh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Chunk.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Chunk.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Chunk.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> template&lt;class Traits&gt;
</span><span class="cx"> inline auto Chunk&lt;Traits&gt;::get(void* object) -&gt; Chunk*
</span><span class="cx"> {
</span><del>-    BASSERT(isSmallOrMedium(object));
</del><ins>+    BASSERT(isSmall(object));
</ins><span class="cx">     return static_cast&lt;Chunk*&gt;(mask(object, chunkMask));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocDeallocatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Deallocator.cpp (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Deallocator.cpp        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Deallocator.cpp        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -77,14 +77,8 @@
</span><span class="cx">     Heap* heap = PerProcess&lt;Heap&gt;::getFastCase();
</span><span class="cx">     
</span><span class="cx">     for (auto* object : m_objectLog) {
</span><del>-        if (isSmall(object)) {
-            SmallLine* line = SmallLine::get(object);
-            heap-&gt;derefSmallLine(lock, line);
-        } else {
-            BASSERT(isMedium(object));
-            MediumLine* line = MediumLine::get(object);
-            heap-&gt;derefMediumLine(lock, line);
-        }
</del><ins>+        SmallLine* line = SmallLine::get(object);
+        heap-&gt;derefSmallLine(lock, line);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     m_objectLog.clear();
</span><span class="lines">@@ -103,7 +97,7 @@
</span><span class="cx">     if (!object)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (isSmallOrMedium(object)) {
</del><ins>+    if (isSmall(object)) {
</ins><span class="cx">         processObjectLog();
</span><span class="cx">         m_objectLog.push(object);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocDeallocatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Deallocator.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Deallocator.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Deallocator.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool Deallocator::deallocateFastCase(void* object)
</span><span class="cx"> {
</span><del>-    if (!isSmallOrMedium(object))
</del><ins>+    if (!isSmall(object))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     BASSERT(object);
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Heap.cpp (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Heap.cpp        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Heap.cpp        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> #include &quot;LargeChunk.h&quot;
</span><span class="cx"> #include &quot;LargeObject.h&quot;
</span><span class="cx"> #include &quot;Line.h&quot;
</span><del>-#include &quot;MediumChunk.h&quot;
</del><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;PerProcess.h&quot;
</span><span class="cx"> #include &quot;SmallChunk.h&quot;
</span><span class="lines">@@ -46,36 +45,32 @@
</span><span class="cx"> 
</span><span class="cx"> void Heap::initializeLineMetadata()
</span><span class="cx"> {
</span><del>-    for (unsigned short size = alignment; size &lt;= smallMax; size += alignment) {
-        unsigned short startOffset = 0;
-        for (size_t lineNumber = 0; lineNumber &lt; SmallPage::lineCount - 1; ++lineNumber) {
-            unsigned short objectCount;
-            unsigned short remainder;
-            divideRoundingUp(static_cast&lt;unsigned short&gt;(SmallPage::lineSize - startOffset), size, objectCount, remainder);
-            BASSERT(objectCount);
-            m_smallLineMetadata[sizeClass(size)][lineNumber] = { startOffset, objectCount };
-            startOffset = remainder ? size - remainder : 0;
-        }
</del><ins>+    // We assume that m_smallLineMetadata is zero-filled.
</ins><span class="cx"> 
</span><del>-        // The last line in the page rounds down instead of up because it's not allowed to overlap into its neighbor.
-        unsigned short objectCount = static_cast&lt;unsigned short&gt;((SmallPage::lineSize - startOffset) / size);
-        m_smallLineMetadata[sizeClass(size)][SmallPage::lineCount - 1] = { startOffset, objectCount };
-    }
</del><ins>+    for (size_t size = alignment; size &lt;= smallMax; size += alignment) {
+        size_t sizeClass = bmalloc::sizeClass(size);
+        auto&amp; metadata = m_smallLineMetadata[sizeClass];
</ins><span class="cx"> 
</span><del>-    for (unsigned short size = smallMax + alignment; size &lt;= mediumMax; size += alignment) {
-        unsigned short startOffset = 0;
-        for (size_t lineNumber = 0; lineNumber &lt; MediumPage::lineCount - 1; ++lineNumber) {
-            unsigned short objectCount;
-            unsigned short remainder;
-            divideRoundingUp(static_cast&lt;unsigned short&gt;(MediumPage::lineSize - startOffset), size, objectCount, remainder);
-            BASSERT(objectCount);
-            m_mediumLineMetadata[sizeClass(size)][lineNumber] = { startOffset, objectCount };
-            startOffset = remainder ? size - remainder : 0;
</del><ins>+        size_t object = 0;
+        size_t line = 0;
+        while (object &lt; vmPageSize) {
+            line = object / SmallPage::lineSize;
+            size_t leftover = object % SmallPage::lineSize;
+
+            size_t objectCount;
+            size_t remainder;
+            divideRoundingUp(SmallPage::lineSize - leftover, size, objectCount, remainder);
+
+            metadata[line] = { static_cast&lt;unsigned short&gt;(leftover), static_cast&lt;unsigned short&gt;(objectCount) };
+
+            object += objectCount * size;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        // The last line in the page rounds down instead of up because it's not allowed to overlap into its neighbor.
-        unsigned short objectCount = static_cast&lt;unsigned short&gt;((MediumPage::lineSize - startOffset) / size);
-        m_mediumLineMetadata[sizeClass(size)][MediumPage::lineCount - 1] = { startOffset, objectCount };
</del><ins>+        // Don't allow the last object in a page to escape the page.
+        if (object &gt; vmPageSize) {
+            BASSERT(metadata[line].objectCount);
+            --metadata[line].objectCount;
+        }
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -90,7 +85,6 @@
</span><span class="cx">     waitUntilFalse(lock, sleepDuration, m_isAllocatingPages);
</span><span class="cx"> 
</span><span class="cx">     scavengeSmallPages(lock, sleepDuration);
</span><del>-    scavengeMediumPages(lock, sleepDuration);
</del><span class="cx">     scavengeLargeObjects(lock, sleepDuration);
</span><span class="cx"> 
</span><span class="cx">     sleep(lock, sleepDuration);
</span><span class="lines">@@ -104,14 +98,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Heap::scavengeMediumPages(std::unique_lock&lt;StaticMutex&gt;&amp; lock, std::chrono::milliseconds sleepDuration)
-{
-    while (m_mediumPages.size()) {
-        m_vmHeap.deallocateMediumPage(lock, m_mediumPages.pop());
-        waitUntilFalse(lock, sleepDuration, m_isAllocatingPages);
-    }
-}
-
</del><span class="cx"> void Heap::scavengeLargeObjects(std::unique_lock&lt;StaticMutex&gt;&amp; lock, std::chrono::milliseconds sleepDuration)
</span><span class="cx"> {
</span><span class="cx">     while (LargeObject largeObject = m_largeObjects.takeGreedy()) {
</span><span class="lines">@@ -125,81 +111,37 @@
</span><span class="cx">     BASSERT(!rangeCache.size());
</span><span class="cx">     SmallPage* page = allocateSmallPage(lock, sizeClass);
</span><span class="cx">     SmallLine* lines = page-&gt;begin();
</span><ins>+    BASSERT(page-&gt;hasFreeLines(lock));
</ins><span class="cx"> 
</span><del>-    // Due to overlap from the previous line, the last line in the page may not be able to fit any objects.
-    size_t end = SmallPage::lineCount;
-    if (!m_smallLineMetadata[sizeClass][SmallPage::lineCount - 1].objectCount)
-        --end;
-
</del><span class="cx">     // Find a free line.
</span><del>-    for (size_t lineNumber = 0; lineNumber &lt; end; ++lineNumber) {
</del><ins>+    for (size_t lineNumber = 0; lineNumber &lt; SmallPage::lineCount; ++lineNumber) {
</ins><span class="cx">         if (lines[lineNumber].refCount(lock))
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><ins>+        LineMetadata&amp; lineMetadata = m_smallLineMetadata[sizeClass][lineNumber];
+        if (!lineMetadata.objectCount)
+            continue;
+
</ins><span class="cx">         // In a fragmented page, some free ranges might not fit in the cache.
</span><span class="cx">         if (rangeCache.size() == rangeCache.capacity()) {
</span><span class="cx">             m_smallPagesWithFreeLines[sizeClass].push(page);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        LineMetadata&amp; lineMetadata = m_smallLineMetadata[sizeClass][lineNumber];
</del><span class="cx">         char* begin = lines[lineNumber].begin() + lineMetadata.startOffset;
</span><span class="cx">         unsigned short objectCount = lineMetadata.objectCount;
</span><span class="cx">         lines[lineNumber].ref(lock, lineMetadata.objectCount);
</span><span class="cx">         page-&gt;ref(lock);
</span><span class="cx"> 
</span><span class="cx">         // Merge with subsequent free lines.
</span><del>-        while (++lineNumber &lt; end) {
</del><ins>+        while (++lineNumber &lt; SmallPage::lineCount) {
</ins><span class="cx">             if (lines[lineNumber].refCount(lock))
</span><span class="cx">                 break;
</span><span class="cx"> 
</span><span class="cx">             LineMetadata&amp; lineMetadata = m_smallLineMetadata[sizeClass][lineNumber];
</span><del>-            objectCount += lineMetadata.objectCount;
-            lines[lineNumber].ref(lock, lineMetadata.objectCount);
-            page-&gt;ref(lock);
-        }
</del><ins>+            if (!lineMetadata.objectCount)
+                continue;
</ins><span class="cx"> 
</span><del>-        if (!allocator.canAllocate())
-            allocator.refill({ begin, objectCount });
-        else
-            rangeCache.push({ begin, objectCount });
-    }
-}
-
-void Heap::allocateMediumBumpRanges(std::lock_guard&lt;StaticMutex&gt;&amp; lock, size_t sizeClass, BumpAllocator&amp; allocator, BumpRangeCache&amp; rangeCache)
-{
-    MediumPage* page = allocateMediumPage(lock, sizeClass);
-    BASSERT(!rangeCache.size());
-    MediumLine* lines = page-&gt;begin();
-
-    // Due to overlap from the previous line, the last line in the page may not be able to fit any objects.
-    size_t end = MediumPage::lineCount;
-    if (!m_mediumLineMetadata[sizeClass][MediumPage::lineCount - 1].objectCount)
-        --end;
-
-    // Find a free line.
-    for (size_t lineNumber = 0; lineNumber &lt; end; ++lineNumber) {
-        if (lines[lineNumber].refCount(lock))
-            continue;
-
-        // In a fragmented page, some free ranges might not fit in the cache.
-        if (rangeCache.size() == rangeCache.capacity()) {
-            m_mediumPagesWithFreeLines[sizeClass].push(page);
-            return;
-        }
-
-        LineMetadata&amp; lineMetadata = m_mediumLineMetadata[sizeClass][lineNumber];
-        char* begin = lines[lineNumber].begin() + lineMetadata.startOffset;
-        unsigned short objectCount = lineMetadata.objectCount;
-        lines[lineNumber].ref(lock, lineMetadata.objectCount);
-        page-&gt;ref(lock);
-        
-        // Merge with subsequent free lines.
-        while (++lineNumber &lt; end) {
-            if (lines[lineNumber].refCount(lock))
-                break;
-
-            LineMetadata&amp; lineMetadata = m_mediumLineMetadata[sizeClass][lineNumber];
</del><span class="cx">             objectCount += lineMetadata.objectCount;
</span><span class="cx">             lines[lineNumber].ref(lock, lineMetadata.objectCount);
</span><span class="cx">             page-&gt;ref(lock);
</span><span class="lines">@@ -210,6 +152,8 @@
</span><span class="cx">         else
</span><span class="cx">             rangeCache.push({ begin, objectCount });
</span><span class="cx">     }
</span><ins>+
+    page-&gt;setHasFreeLines(lock, false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SmallPage* Heap::allocateSmallPage(std::lock_guard&lt;StaticMutex&gt;&amp; lock, size_t sizeClass)
</span><span class="lines">@@ -222,34 +166,13 @@
</span><span class="cx">         return page;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    SmallPage* page = [this, sizeClass]() {
</del><ins>+    SmallPage* page = [this, &amp;lock]() {
</ins><span class="cx">         if (m_smallPages.size())
</span><span class="cx">             return m_smallPages.pop();
</span><span class="cx"> 
</span><span class="cx">         m_isAllocatingPages = true;
</span><del>-        return m_vmHeap.allocateSmallPage();
-    }();
-
-    page-&gt;setSizeClass(sizeClass);
-    return page;
-}
-
-MediumPage* Heap::allocateMediumPage(std::lock_guard&lt;StaticMutex&gt;&amp; lock, size_t sizeClass)
-{
-    Vector&lt;MediumPage*&gt;&amp; mediumPagesWithFreeLines = m_mediumPagesWithFreeLines[sizeClass];
-    while (mediumPagesWithFreeLines.size()) {
-        MediumPage* page = mediumPagesWithFreeLines.pop();
-        if (!page-&gt;refCount(lock) || page-&gt;sizeClass() != sizeClass) // Page was promoted to the pages list.
-            continue;
</del><ins>+        SmallPage* page = m_vmHeap.allocateSmallPage(lock);
</ins><span class="cx">         return page;
</span><del>-    }
-
-    MediumPage* page = [this, sizeClass]() {
-        if (m_mediumPages.size())
-            return m_mediumPages.pop();
-
-        m_isAllocatingPages = true;
-        return m_vmHeap.allocateMediumPage();
</del><span class="cx">     }();
</span><span class="cx"> 
</span><span class="cx">     page-&gt;setSizeClass(sizeClass);
</span><span class="lines">@@ -260,44 +183,21 @@
</span><span class="cx"> {
</span><span class="cx">     BASSERT(!line-&gt;refCount(lock));
</span><span class="cx">     SmallPage* page = SmallPage::get(line);
</span><del>-    size_t refCount = page-&gt;refCount(lock);
</del><span class="cx">     page-&gt;deref(lock);
</span><span class="cx"> 
</span><del>-    switch (refCount) {
-    case SmallPage::lineCount: {
-        // First free line in the page.
</del><ins>+    if (!page-&gt;hasFreeLines(lock)) {
+        page-&gt;setHasFreeLines(lock, true);
</ins><span class="cx">         m_smallPagesWithFreeLines[page-&gt;sizeClass()].push(page);
</span><del>-        break;
</del><ins>+
+        BASSERT(page-&gt;refCount(lock));
+        return;
</ins><span class="cx">     }
</span><del>-    case 1: {
-        // Last free line in the page.
-        m_smallPages.push(page);
-        m_scavenger.run();
-        break;
-    }
-    }
-}
</del><span class="cx"> 
</span><del>-void Heap::deallocateMediumLine(std::lock_guard&lt;StaticMutex&gt;&amp; lock, MediumLine* line)
-{
-    BASSERT(!line-&gt;refCount(lock));
-    MediumPage* page = MediumPage::get(line);
-    size_t refCount = page-&gt;refCount(lock);
-    page-&gt;deref(lock);
</del><ins>+    if (page-&gt;refCount(lock))
+        return;
</ins><span class="cx"> 
</span><del>-    switch (refCount) {
-    case MediumPage::lineCount: {
-        // First free line in the page.
-        m_mediumPagesWithFreeLines[page-&gt;sizeClass()].push(page);
-        break;
-    }
-    case 1: {
-        // Last free line in the page.
-        m_mediumPages.push(page);
-        m_scavenger.run();
-        break;
-    }
-    }
</del><ins>+    m_smallPages.push(page);
+    m_scavenger.run();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void* Heap::allocateXLarge(std::lock_guard&lt;StaticMutex&gt;&amp; lock, size_t alignment, size_t size)
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocHeaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Heap.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Heap.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Heap.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -29,9 +29,6 @@
</span><span class="cx"> #include &quot;BumpRange.h&quot;
</span><span class="cx"> #include &quot;Environment.h&quot;
</span><span class="cx"> #include &quot;LineMetadata.h&quot;
</span><del>-#include &quot;MediumChunk.h&quot;
-#include &quot;MediumLine.h&quot;
-#include &quot;MediumPage.h&quot;
</del><span class="cx"> #include &quot;Mutex.h&quot;
</span><span class="cx"> #include &quot;SegregatedFreeList.h&quot;
</span><span class="cx"> #include &quot;SmallChunk.h&quot;
</span><span class="lines">@@ -57,9 +54,6 @@
</span><span class="cx">     void allocateSmallBumpRanges(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t sizeClass, BumpAllocator&amp;, BumpRangeCache&amp;);
</span><span class="cx">     void derefSmallLine(std::lock_guard&lt;StaticMutex&gt;&amp;, SmallLine*);
</span><span class="cx"> 
</span><del>-    void allocateMediumBumpRanges(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t sizeClass, BumpAllocator&amp;, BumpRangeCache&amp;);
-    void derefMediumLine(std::lock_guard&lt;StaticMutex&gt;&amp;, MediumLine*);
-
</del><span class="cx">     void* allocateLarge(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t);
</span><span class="cx">     void* allocateLarge(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t alignment, size_t, size_t unalignedSize);
</span><span class="cx">     void deallocateLarge(std::lock_guard&lt;StaticMutex&gt;&amp;, void*);
</span><span class="lines">@@ -78,11 +72,8 @@
</span><span class="cx">     void initializeLineMetadata();
</span><span class="cx"> 
</span><span class="cx">     SmallPage* allocateSmallPage(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t sizeClass);
</span><del>-    MediumPage* allocateMediumPage(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t sizeClass);
</del><span class="cx"> 
</span><span class="cx">     void deallocateSmallLine(std::lock_guard&lt;StaticMutex&gt;&amp;, SmallLine*);
</span><del>-    void deallocateMediumLine(std::lock_guard&lt;StaticMutex&gt;&amp;, MediumLine*);
-
</del><span class="cx">     void deallocateLarge(std::lock_guard&lt;StaticMutex&gt;&amp;, const LargeObject&amp;);
</span><span class="cx"> 
</span><span class="cx">     LargeObject&amp; splitAndAllocate(LargeObject&amp;, size_t);
</span><span class="lines">@@ -93,17 +84,13 @@
</span><span class="cx">     
</span><span class="cx">     void concurrentScavenge();
</span><span class="cx">     void scavengeSmallPages(std::unique_lock&lt;StaticMutex&gt;&amp;, std::chrono::milliseconds);
</span><del>-    void scavengeMediumPages(std::unique_lock&lt;StaticMutex&gt;&amp;, std::chrono::milliseconds);
</del><span class="cx">     void scavengeLargeObjects(std::unique_lock&lt;StaticMutex&gt;&amp;, std::chrono::milliseconds);
</span><span class="cx"> 
</span><span class="cx">     std::array&lt;std::array&lt;LineMetadata, SmallPage::lineCount&gt;, smallMax / alignment&gt; m_smallLineMetadata;
</span><del>-    std::array&lt;std::array&lt;LineMetadata, MediumPage::lineCount&gt;, mediumMax / alignment&gt; m_mediumLineMetadata;
</del><span class="cx"> 
</span><span class="cx">     std::array&lt;Vector&lt;SmallPage*&gt;, smallMax / alignment&gt; m_smallPagesWithFreeLines;
</span><del>-    std::array&lt;Vector&lt;MediumPage*&gt;, mediumMax / alignment&gt; m_mediumPagesWithFreeLines;
</del><span class="cx"> 
</span><span class="cx">     Vector&lt;SmallPage*&gt; m_smallPages;
</span><del>-    Vector&lt;MediumPage*&gt; m_mediumPages;
</del><span class="cx"> 
</span><span class="cx">     SegregatedFreeList m_largeObjects;
</span><span class="cx">     Vector&lt;Range&gt; m_xLargeObjects;
</span><span class="lines">@@ -123,13 +110,6 @@
</span><span class="cx">     deallocateSmallLine(lock, line);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void Heap::derefMediumLine(std::lock_guard&lt;StaticMutex&gt;&amp; lock, MediumLine* line)
-{
-    if (!line-&gt;deref(lock))
-        return;
-    deallocateMediumLine(lock, line);
-}
-
</del><span class="cx"> } // namespace bmalloc
</span><span class="cx"> 
</span><span class="cx"> #endif // Heap_h
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocLargeChunkh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/LargeChunk.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/LargeChunk.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/LargeChunk.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline LargeChunk* LargeChunk::get(void* object)
</span><span class="cx"> {
</span><del>-    BASSERT(!isSmallOrMedium(object));
</del><ins>+    BASSERT(!isSmall(object));
</ins><span class="cx">     return static_cast&lt;LargeChunk*&gt;(mask(object, largeChunkMask));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline EndTag* LargeChunk::endTag(void* object, size_t size)
</span><span class="cx"> {
</span><del>-    BASSERT(!isSmallOrMedium(object));
</del><ins>+    BASSERT(!isSmall(object));
</ins><span class="cx"> 
</span><span class="cx">     LargeChunk* chunk = get(object);
</span><span class="cx">     char* end = static_cast&lt;char*&gt;(object) + size;
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocLineh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Line.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Line.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Line.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> template&lt;class Traits&gt;
</span><span class="cx"> inline auto Line&lt;Traits&gt;::get(void* object) -&gt; Line*
</span><span class="cx"> {
</span><del>-    BASSERT(isSmallOrMedium(object));
</del><ins>+    BASSERT(isSmall(object));
</ins><span class="cx">     Chunk* chunk = Chunk::get(object);
</span><span class="cx">     size_t lineNumber = (reinterpret_cast&lt;char*&gt;(object) - reinterpret_cast&lt;char*&gt;(chunk)) / lineSize;
</span><span class="cx">     return &amp;chunk-&gt;lines()[lineNumber];
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocMediumChunkh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/bmalloc/bmalloc/MediumChunk.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/MediumChunk.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/MediumChunk.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -1,40 +0,0 @@
</span><del>-/*
- * 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 MediumChunk_h
-#define MediumChunk_h
-
-#include &quot;Chunk.h&quot;
-#include &quot;MediumLine.h&quot;
-#include &quot;MediumPage.h&quot;
-#include &quot;MediumTraits.h&quot;
-
-namespace bmalloc {
-
-typedef Chunk&lt;MediumTraits&gt; MediumChunk;
-
-}; // namespace bmalloc
-
-#endif // MediumChunk
</del></span></pre></div>
<a id="trunkSourcebmallocbmallocMediumLineh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/bmalloc/bmalloc/MediumLine.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/MediumLine.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/MediumLine.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-/*
- * 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 MediumLine_h
-#define MediumLine_h
-
-#include &quot;Line.h&quot;
-#include &quot;MediumTraits.h&quot;
-
-namespace bmalloc {
-
-typedef Line&lt;MediumTraits&gt; MediumLine;
-
-} // namespace bmalloc
-
-#endif // MediumLine_h
</del></span></pre></div>
<a id="trunkSourcebmallocbmallocMediumPageh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/bmalloc/bmalloc/MediumPage.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/MediumPage.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/MediumPage.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-/*
- * 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 MediumPage_h
-#define MediumPage_h
-
-#include &quot;MediumTraits.h&quot;
-#include &quot;Page.h&quot;
-
-namespace bmalloc {
-
-typedef Page&lt;MediumTraits&gt; MediumPage;
-
-} // namespace bmalloc
-
-#endif // MediumPage_h
</del></span></pre></div>
<a id="trunkSourcebmallocbmallocMediumTraitsh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/bmalloc/bmalloc/MediumTraits.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/MediumTraits.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/MediumTraits.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -1,52 +0,0 @@
</span><del>-/*
- * 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 MediumTraits_h
-#define MediumTraits_h
-
-#include &quot;Sizes.h&quot;
-#include &quot;VMAllocate.h&quot;
-
-namespace bmalloc {
-
-template&lt;class Traits&gt; class Chunk;
-template&lt;class Traits&gt; class Line;
-template&lt;class Traits&gt; class Page;
-
-struct MediumTraits {
-    typedef Chunk&lt;MediumTraits&gt; ChunkType;
-    typedef Line&lt;MediumTraits&gt; LineType;
-    typedef Page&lt;MediumTraits&gt; PageType;
-
-    static const size_t lineSize = mediumLineSize;
-    static const size_t minimumObjectSize = smallMax + alignment;
-    static const size_t chunkSize = mediumChunkSize;
-    static const size_t chunkOffset = mediumChunkOffset;
-    static const uintptr_t chunkMask = mediumChunkMask;
-};
-
-} // namespace bmalloc
-
-#endif // MediumTraits_h
</del></span></pre></div>
<a id="trunkSourcebmallocbmallocObjectTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/ObjectType.cpp (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/ObjectType.cpp        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/ObjectType.cpp        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -30,11 +30,8 @@
</span><span class="cx"> 
</span><span class="cx"> ObjectType objectType(void* object)
</span><span class="cx"> {
</span><del>-    if (isSmallOrMedium(object)) {
-        if (isSmall(object))
-            return Small;
-        return Medium;
-    }
</del><ins>+    if (isSmall(object))
+        return Small;
</ins><span class="cx">     
</span><span class="cx">     if (!isXLarge(object))
</span><span class="cx">         return Large;
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocObjectTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/ObjectType.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/ObjectType.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/ObjectType.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -31,29 +31,18 @@
</span><span class="cx"> 
</span><span class="cx"> namespace bmalloc {
</span><span class="cx"> 
</span><del>-enum ObjectType { Small, Medium, Large, XLarge };
</del><ins>+enum ObjectType { Small, Large, XLarge };
</ins><span class="cx"> 
</span><span class="cx"> ObjectType objectType(void*);
</span><span class="cx"> 
</span><del>-inline bool isSmallOrMedium(void* object)
</del><ins>+inline bool isSmall(void* object)
</ins><span class="cx"> {
</span><del>-    return test(object, smallOrMediumTypeMask);
</del><ins>+    return test(object, smallMask);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline bool isSmall(void* smallOrMedium)
-{
-    BASSERT(isSmallOrMedium(smallOrMedium));
-    return test(smallOrMedium, smallOrMediumSmallTypeMask);
-}
-
-inline bool isMedium(void* smallOrMedium)
-{
-    return !isSmall(smallOrMedium);
-}
-
</del><span class="cx"> inline bool isXLarge(void* object)
</span><span class="cx"> {
</span><del>-    return !test(object, superChunkSize - 1);
</del><ins>+    return !test(object, ~superChunkMask);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace bmalloc
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Page.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Page.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Page.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -54,11 +54,15 @@
</span><span class="cx">     size_t sizeClass() { return m_sizeClass; }
</span><span class="cx">     void setSizeClass(size_t sizeClass) { m_sizeClass = sizeClass; }
</span><span class="cx">     
</span><ins>+    bool hasFreeLines(std::lock_guard&lt;StaticMutex&gt;&amp;) const { return m_hasFreeLines; }
+    void setHasFreeLines(std::lock_guard&lt;StaticMutex&gt;&amp;, bool hasFreeLines) { m_hasFreeLines = hasFreeLines; }
+    
</ins><span class="cx">     Line* begin();
</span><span class="cx">     Line* end();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    unsigned char m_refCount;
</del><ins>+    unsigned char m_hasFreeLines: 1;
+    unsigned char m_refCount: 7;
</ins><span class="cx">     unsigned char m_sizeClass;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocSizesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Sizes.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Sizes.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/Sizes.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -54,23 +54,16 @@
</span><span class="cx">     static const size_t vmPageMask = ~(vmPageSize - 1);
</span><span class="cx">     
</span><span class="cx">     static const size_t superChunkSize = 2 * MB;
</span><ins>+    static const size_t superChunkMask = ~(superChunkSize - 1);
</ins><span class="cx"> 
</span><del>-    static const size_t smallMax = 256;
</del><ins>+    static const size_t smallMax = 1024;
</ins><span class="cx">     static const size_t smallLineSize = 256;
</span><span class="cx">     static const size_t smallLineMask = ~(smallLineSize - 1ul);
</span><span class="cx"> 
</span><del>-    static const size_t smallChunkSize = superChunkSize / 4;
-    static const size_t smallChunkOffset = superChunkSize * 3 / 4;
</del><ins>+    static const size_t smallChunkSize = superChunkSize / 2;
+    static const size_t smallChunkOffset = superChunkSize / 2;
</ins><span class="cx">     static const size_t smallChunkMask = ~(smallChunkSize - 1ul);
</span><span class="cx"> 
</span><del>-    static const size_t mediumMax = 1024;
-    static const size_t mediumLineSize = 1024;
-    static const size_t mediumLineMask = ~(mediumLineSize - 1ul);
-
-    static const size_t mediumChunkSize = superChunkSize / 4;
-    static const size_t mediumChunkOffset = superChunkSize * 2 / 4;
-    static const size_t mediumChunkMask = ~(mediumChunkSize - 1ul);
-
</del><span class="cx">     static const size_t largeChunkSize = superChunkSize / 2;
</span><span class="cx"> #if BPLATFORM(IOS)
</span><span class="cx">     static const size_t largeChunkMetadataSize = 16 * kB;
</span><span class="lines">@@ -82,7 +75,7 @@
</span><span class="cx"> 
</span><span class="cx">     static const size_t largeAlignment = 64;
</span><span class="cx">     static const size_t largeMax = largeChunkSize - largeChunkMetadataSize;
</span><del>-    static const size_t largeMin = mediumMax;
</del><ins>+    static const size_t largeMin = smallMax;
</ins><span class="cx">     
</span><span class="cx">     static const size_t xLargeAlignment = vmPageSize;
</span><span class="cx">     static const size_t xLargeMax = std::numeric_limits&lt;size_t&gt;::max() - xLargeAlignment; // Make sure that rounding up to xLargeAlignment does not overflow.
</span><span class="lines">@@ -90,12 +83,9 @@
</span><span class="cx">     static const size_t freeListSearchDepth = 16;
</span><span class="cx">     static const size_t freeListGrowFactor = 2;
</span><span class="cx"> 
</span><del>-    static const uintptr_t typeMask = (superChunkSize - 1) &amp; ~((superChunkSize / 4) - 1); // 4 taggable chunks
-    static const uintptr_t smallType = (superChunkSize + smallChunkOffset) &amp; typeMask;
-    static const uintptr_t mediumType = (superChunkSize + mediumChunkOffset) &amp; typeMask;
-    static const uintptr_t largeTypeMask = ~(mediumType &amp; smallType);
-    static const uintptr_t smallOrMediumTypeMask = mediumType &amp; smallType;
-    static const uintptr_t smallOrMediumSmallTypeMask = smallType ^ mediumType; // Only valid if object is known to be small or medium.
</del><ins>+    static const uintptr_t typeMask = (superChunkSize - 1) &amp; ~((superChunkSize / 2) - 1); // 2 taggable chunks
+    static const uintptr_t largeMask = typeMask &amp; (superChunkSize + largeChunkOffset);
+    static const uintptr_t smallMask = typeMask &amp; (superChunkSize + smallChunkOffset);
</ins><span class="cx"> 
</span><span class="cx">     static const size_t deallocatorLogCapacity = 256;
</span><span class="cx">     static const size_t bumpRangeCacheCapacity = 3;
</span><span class="lines">@@ -104,7 +94,7 @@
</span><span class="cx"> 
</span><span class="cx">     inline size_t sizeClass(size_t size)
</span><span class="cx">     {
</span><del>-        static const size_t sizeClassMask = (mediumMax / alignment) - 1;
</del><ins>+        static const size_t sizeClassMask = (smallMax / alignment) - 1;
</ins><span class="cx">         return mask((size - 1) / alignment, sizeClassMask);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocSuperChunkh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/SuperChunk.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/SuperChunk.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/SuperChunk.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #define SuperChunk_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;LargeChunk.h&quot;
</span><del>-#include &quot;MediumChunk.h&quot;
</del><span class="cx"> #include &quot;SmallChunk.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace bmalloc {
</span><span class="lines">@@ -37,7 +36,6 @@
</span><span class="cx">     static SuperChunk* create();
</span><span class="cx"> 
</span><span class="cx">     SmallChunk* smallChunk();
</span><del>-    MediumChunk* mediumChunk();
</del><span class="cx">     LargeChunk* largeChunk();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -53,7 +51,6 @@
</span><span class="cx"> inline SuperChunk::SuperChunk()
</span><span class="cx"> {
</span><span class="cx">     new (smallChunk()) SmallChunk;
</span><del>-    new (mediumChunk()) MediumChunk;
</del><span class="cx">     new (largeChunk()) LargeChunk;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -63,12 +60,6 @@
</span><span class="cx">         reinterpret_cast&lt;char*&gt;(this) + smallChunkOffset);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline MediumChunk* SuperChunk::mediumChunk()
-{
-    return reinterpret_cast&lt;MediumChunk*&gt;(
-        reinterpret_cast&lt;char*&gt;(this) + mediumChunkOffset);
-}
-
</del><span class="cx"> inline LargeChunk* SuperChunk::largeChunk()
</span><span class="cx"> {
</span><span class="cx">     return reinterpret_cast&lt;LargeChunk*&gt;(
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocVMHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/VMHeap.cpp (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/VMHeap.cpp        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/VMHeap.cpp        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -24,7 +24,6 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;LargeObject.h&quot;
</span><del>-#include &quot;Line.h&quot;
</del><span class="cx"> #include &quot;PerProcess.h&quot;
</span><span class="cx"> #include &quot;SuperChunk.h&quot;
</span><span class="cx"> #include &quot;VMHeap.h&quot;
</span><span class="lines">@@ -48,10 +47,6 @@
</span><span class="cx">     for (auto* it = smallChunk-&gt;begin(); it != smallChunk-&gt;end(); ++it)
</span><span class="cx">         m_smallPages.push(it);
</span><span class="cx"> 
</span><del>-    MediumChunk* mediumChunk = superChunk-&gt;mediumChunk();
-    for (auto* it = mediumChunk-&gt;begin(); it != mediumChunk-&gt;end(); ++it)
-        m_mediumPages.push(it);
-
</del><span class="cx">     LargeChunk* largeChunk = superChunk-&gt;largeChunk();
</span><span class="cx">     LargeObject result(LargeObject::init(largeChunk).begin());
</span><span class="cx">     BASSERT(result.size() == largeMax);
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocVMHeaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/VMHeap.h (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/VMHeap.h        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc/VMHeap.h        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #include &quot;FixedVector.h&quot;
</span><span class="cx"> #include &quot;LargeChunk.h&quot;
</span><span class="cx"> #include &quot;LargeObject.h&quot;
</span><del>-#include &quot;MediumChunk.h&quot;
</del><span class="cx"> #include &quot;Range.h&quot;
</span><span class="cx"> #include &quot;SegregatedFreeList.h&quot;
</span><span class="cx"> #include &quot;SmallChunk.h&quot;
</span><span class="lines">@@ -51,46 +50,34 @@
</span><span class="cx"> public:
</span><span class="cx">     VMHeap();
</span><span class="cx"> 
</span><del>-    SmallPage* allocateSmallPage();
-    MediumPage* allocateMediumPage();
</del><ins>+    SmallPage* allocateSmallPage(std::lock_guard&lt;StaticMutex&gt;&amp;);
</ins><span class="cx">     LargeObject allocateLargeObject(size_t);
</span><span class="cx">     LargeObject allocateLargeObject(size_t, size_t, size_t);
</span><span class="cx"> 
</span><span class="cx">     void deallocateSmallPage(std::unique_lock&lt;StaticMutex&gt;&amp;, SmallPage*);
</span><del>-    void deallocateMediumPage(std::unique_lock&lt;StaticMutex&gt;&amp;, MediumPage*);
</del><span class="cx">     void deallocateLargeObject(std::unique_lock&lt;StaticMutex&gt;&amp;, LargeObject);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void grow();
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;SmallPage*&gt; m_smallPages;
</span><del>-    Vector&lt;MediumPage*&gt; m_mediumPages;
</del><span class="cx">     SegregatedFreeList m_largeObjects;
</span><span class="cx"> #if BOS(DARWIN)
</span><span class="cx">     Zone m_zone;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline SmallPage* VMHeap::allocateSmallPage()
</del><ins>+inline SmallPage* VMHeap::allocateSmallPage(std::lock_guard&lt;StaticMutex&gt;&amp; lock)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_smallPages.size())
</span><span class="cx">         grow();
</span><span class="cx"> 
</span><span class="cx">     SmallPage* page = m_smallPages.pop();
</span><ins>+    page-&gt;setHasFreeLines(lock, true);
</ins><span class="cx">     vmAllocatePhysicalPages(page-&gt;begin()-&gt;begin(), vmPageSize);
</span><span class="cx">     return page;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline MediumPage* VMHeap::allocateMediumPage()
-{
-    if (!m_mediumPages.size())
-        grow();
-
-    MediumPage* page = m_mediumPages.pop();
-    vmAllocatePhysicalPages(page-&gt;begin()-&gt;begin(), vmPageSize);
-    return page;
-}
-
</del><span class="cx"> inline LargeObject VMHeap::allocateLargeObject(size_t size)
</span><span class="cx"> {
</span><span class="cx">     LargeObject largeObject = m_largeObjects.take(size);
</span><span class="lines">@@ -124,15 +111,6 @@
</span><span class="cx">     m_smallPages.push(page);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void VMHeap::deallocateMediumPage(std::unique_lock&lt;StaticMutex&gt;&amp; lock, MediumPage* page)
-{
-    lock.unlock();
-    vmDeallocatePhysicalPages(page-&gt;begin()-&gt;begin(), vmPageSize);
-    lock.lock();
-    
-    m_mediumPages.push(page);
-}
-
</del><span class="cx"> inline void VMHeap::deallocateLargeObject(std::unique_lock&lt;StaticMutex&gt;&amp; lock, LargeObject largeObject)
</span><span class="cx"> {
</span><span class="cx">     // Multiple threads might scavenge concurrently, meaning that new merging opportunities
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj (196844 => 196845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj        2016-02-20 00:01:51 UTC (rev 196844)
+++ trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj        2016-02-20 00:03:56 UTC (rev 196845)
</span><span class="lines">@@ -39,10 +39,6 @@
</span><span class="cx">                 14DD789C18F48D4A00950702 /* BumpAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1413E462189DE1CD00546D68 /* BumpAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14DD78B418F48D6B00950702 /* Chunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 147AAA9418CE5CA6002201E4 /* Chunk.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14DD78B518F48D6B00950702 /* Line.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DA32071885F9E6007269E0 /* Line.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                14DD78B618F48D6B00950702 /* MediumChunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 147AAA8E18CD89E3002201E4 /* MediumChunk.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                14DD78B718F48D6B00950702 /* MediumLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1452478518BC757C00F80098 /* MediumLine.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                14DD78B818F48D6B00950702 /* MediumPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 143E29E918CAE8BE00FE8A0F /* MediumPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                14DD78B918F48D6B00950702 /* MediumTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 147AAA9618CE5FB6002201E4 /* MediumTraits.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 14DD78BA18F48D6B00950702 /* Page.h in Headers */ = {isa = PBXBuildFile; fileRef = 146BEE2318C980D60002D5A2 /* Page.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14DD78BB18F48D6B00950702 /* SmallChunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 147AAA8C18CD36A7002201E4 /* SmallChunk.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14DD78BC18F48D6B00950702 /* SmallLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1452478618BC757C00F80098 /* SmallLine.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -93,7 +89,6 @@
</span><span class="cx">                 1421A87718EE462A00B4DD68 /* Algorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Algorithm.h; path = bmalloc/Algorithm.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 143CB81A19022BC900B16A45 /* StaticMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StaticMutex.cpp; path = bmalloc/StaticMutex.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 143CB81B19022BC900B16A45 /* StaticMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StaticMutex.h; path = bmalloc/StaticMutex.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                143E29E918CAE8BE00FE8A0F /* MediumPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediumPage.h; path = bmalloc/MediumPage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 143E29ED18CAE90500FE8A0F /* SmallPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SmallPage.h; path = bmalloc/SmallPage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 143EF9AD1A9FABF6004F5C77 /* FreeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FreeList.cpp; path = bmalloc/FreeList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 143EF9AE1A9FABF6004F5C77 /* FreeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FreeList.h; path = bmalloc/FreeList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -109,7 +104,6 @@
</span><span class="cx">                 144DCED617A649D90093B2F2 /* Mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mutex.h; path = bmalloc/Mutex.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 144F7BFB18BFC517003537F3 /* VMHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VMHeap.cpp; path = bmalloc/VMHeap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 144F7BFC18BFC517003537F3 /* VMHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VMHeap.h; path = bmalloc/VMHeap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1452478518BC757C00F80098 /* MediumLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediumLine.h; path = bmalloc/MediumLine.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1452478618BC757C00F80098 /* SmallLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SmallLine.h; path = bmalloc/SmallLine.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 145F6855179DC8CA00D65598 /* Allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = Allocator.cpp; path = bmalloc/Allocator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</span><span class="cx">                 145F6856179DC8CA00D65598 /* Allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = Allocator.h; path = bmalloc/Allocator.h; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
</span><span class="lines">@@ -124,9 +118,7 @@
</span><span class="cx">                 1479E21417A1A63E006D4E9D /* VMAllocate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = VMAllocate.h; path = bmalloc/VMAllocate.h; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
</span><span class="cx">                 147AAA8818CD17CE002201E4 /* LargeChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LargeChunk.h; path = bmalloc/LargeChunk.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 147AAA8C18CD36A7002201E4 /* SmallChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SmallChunk.h; path = bmalloc/SmallChunk.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                147AAA8E18CD89E3002201E4 /* MediumChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediumChunk.h; path = bmalloc/MediumChunk.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 147AAA9418CE5CA6002201E4 /* Chunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Chunk.h; path = bmalloc/Chunk.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                147AAA9618CE5FB6002201E4 /* MediumTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediumTraits.h; path = bmalloc/MediumTraits.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 147AAA9718CE5FB6002201E4 /* SmallTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SmallTraits.h; path = bmalloc/SmallTraits.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1485655E18A43AF900ED6942 /* BoundaryTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BoundaryTag.h; path = bmalloc/BoundaryTag.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1485656018A43DBA00ED6942 /* ObjectType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectType.h; path = bmalloc/ObjectType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -180,7 +172,7 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 1448C2FD18F3752B00502839 /* api */,
</span><span class="cx">                                 14D9DB4D17F2865C00EAAB79 /* cache */,
</span><del>-                                147AAA9C18CE6010002201E4 /* heap: large | xlarge */,
</del><ins>+                                147AAA9C18CE6010002201E4 /* heap: large */,
</ins><span class="cx">                                 147AAA9A18CE5FD3002201E4 /* heap: small | medium */,
</span><span class="cx">                                 14D9DB4E17F2866E00EAAB79 /* heap */,
</span><span class="cx">                                 14D9DB4F17F2868900EAAB79 /* stdlib */,
</span><span class="lines">@@ -203,10 +195,6 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 147AAA9418CE5CA6002201E4 /* Chunk.h */,
</span><span class="cx">                                 14DA32071885F9E6007269E0 /* Line.h */,
</span><del>-                                147AAA8E18CD89E3002201E4 /* MediumChunk.h */,
-                                1452478518BC757C00F80098 /* MediumLine.h */,
-                                143E29E918CAE8BE00FE8A0F /* MediumPage.h */,
-                                147AAA9618CE5FB6002201E4 /* MediumTraits.h */,
</del><span class="cx">                                 146BEE2318C980D60002D5A2 /* Page.h */,
</span><span class="cx">                                 147AAA8C18CD36A7002201E4 /* SmallChunk.h */,
</span><span class="cx">                                 1452478618BC757C00F80098 /* SmallLine.h */,
</span><span class="lines">@@ -216,7 +204,7 @@
</span><span class="cx">                         name = &quot;heap: small | medium&quot;;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><del>-                147AAA9C18CE6010002201E4 /* heap: large | xlarge */ = {
</del><ins>+                147AAA9C18CE6010002201E4 /* heap: large */ = {
</ins><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 1417F64518B54A700076FA3F /* BeginTag.h */,
</span><span class="lines">@@ -230,7 +218,7 @@
</span><span class="cx">                                 146BEE1E18C841C50002D5A2 /* SegregatedFreeList.h */,
</span><span class="cx">                                 14D2CD9A1AA12CFB00770440 /* VMState.h */,
</span><span class="cx">                         );
</span><del>-                        name = &quot;heap: large | xlarge&quot;;
</del><ins>+                        name = &quot;heap: large&quot;;
</ins><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><span class="cx">                 14B650C418F39F4800751968 /* Configurations */ = {
</span><span class="lines">@@ -326,7 +314,6 @@
</span><span class="cx">                                 14DD78B418F48D6B00950702 /* Chunk.h in Headers */,
</span><span class="cx">                                 14DD78CA18F48D7500950702 /* Mutex.h in Headers */,
</span><span class="cx">                                 143CB81D19022BC900B16A45 /* StaticMutex.h in Headers */,
</span><del>-                                14DD78B918F48D6B00950702 /* MediumTraits.h in Headers */,
</del><span class="cx">                                 1448C30118F3754C00502839 /* bmalloc.h in Headers */,
</span><span class="cx">                                 14C6216F1A9A9A6200E72293 /* LargeObject.h in Headers */,
</span><span class="cx">                                 14DD789A18F48D4A00950702 /* Deallocator.h in Headers */,
</span><span class="lines">@@ -349,15 +336,12 @@
</span><span class="cx">                                 14895D921A3A319C0006235D /* Environment.h in Headers */,
</span><span class="cx">                                 1400274A18F89C2300115C97 /* VMHeap.h in Headers */,
</span><span class="cx">                                 1400274918F89C1300115C97 /* Heap.h in Headers */,
</span><del>-                                14DD78B818F48D6B00950702 /* MediumPage.h in Headers */,
</del><span class="cx">                                 140FA00319CE429C00FFD3C8 /* BumpRange.h in Headers */,
</span><span class="cx">                                 14DD78C518F48D7500950702 /* Algorithm.h in Headers */,
</span><span class="cx">                                 14DD78BD18F48D6B00950702 /* SmallPage.h in Headers */,
</span><span class="cx">                                 14DD788E18F48CCD00950702 /* BoundaryTag.h in Headers */,
</span><span class="cx">                                 14DD78C818F48D7500950702 /* FixedVector.h in Headers */,
</span><del>-                                14DD78B718F48D6B00950702 /* MediumLine.h in Headers */,
</del><span class="cx">                                 14D2CD9B1AA12CFB00770440 /* VMState.h in Headers */,
</span><del>-                                14DD78B618F48D6B00950702 /* MediumChunk.h in Headers */,
</del><span class="cx">                                 14DD78BC18F48D6B00950702 /* SmallLine.h in Headers */,
</span><span class="cx">                                 14DD789818F48D4A00950702 /* Allocator.h in Headers */,
</span><span class="cx">                                 14DD78CB18F48D7500950702 /* PerProcess.h in Headers */,
</span></span></pre>
</div>
</div>

</body>
</html>