<!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>[205032] trunk</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/205032">205032</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2016-08-26 13:18:00 -0700 (Fri, 26 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Renamed XLarge* =&gt; Large*
https://bugs.webkit.org/show_bug.cgi?id=161261

Reviewed by Andreas Kling.

XLarge is not a thing anymore: We just have Small and Large.

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Heap.cpp:
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::tryAllocateLarge):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
* bmalloc/Heap.h:
* bmalloc/LargeMap.cpp: Copied from Source/bmalloc/bmalloc/XLargeMap.cpp.
(bmalloc::LargeMap::remove):
(bmalloc::LargeMap::add):
(bmalloc::XLargeMap::remove): Deleted.
(bmalloc::XLargeMap::add): Deleted.
* bmalloc/LargeMap.h: Copied from Source/bmalloc/bmalloc/XLargeMap.h.
(bmalloc::LargeMap::ranges):
(bmalloc::XLargeMap::ranges): Deleted.
* bmalloc/LargeRange.h: Copied from Source/bmalloc/bmalloc/XLargeRange.h.
(bmalloc::LargeRange::LargeRange):
(bmalloc::LargeRange::operator&lt;):
(bmalloc::canMerge):
(bmalloc::merge):
(bmalloc::LargeRange::split):
(bmalloc::XLargeRange::XLargeRange): Deleted.
(bmalloc::XLargeRange::operator&lt;): Deleted.
(bmalloc::XLargeRange::split): Deleted.
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::tryAllocateLargeChunk):
* bmalloc/VMHeap.h:
* bmalloc/XLargeMap.cpp: Removed.
* bmalloc/XLargeMap.h: Removed.
* bmalloc/XLargeRange.h: Removed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchxcodeprojprojectpbxproj">trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchrunmallocbenchmarks">trunk/PerformanceTests/MallocBench/run-malloc-benchmarks</a></li>
<li><a href="#trunkSourcebmallocChangeLog">trunk/Source/bmalloc/ChangeLog</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="#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>Added Paths</h3>
<ul>
<li><a href="#trunkSourcebmallocbmallocLargeMapcpp">trunk/Source/bmalloc/bmalloc/LargeMap.cpp</a></li>
<li><a href="#trunkSourcebmallocbmallocLargeMaph">trunk/Source/bmalloc/bmalloc/LargeMap.h</a></li>
<li><a href="#trunkSourcebmallocbmallocLargeRangeh">trunk/Source/bmalloc/bmalloc/LargeRange.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourcebmallocbmallocXLargeMapcpp">trunk/Source/bmalloc/bmalloc/XLargeMap.cpp</a></li>
<li><a href="#trunkSourcebmallocbmallocXLargeMaph">trunk/Source/bmalloc/bmalloc/XLargeMap.h</a></li>
<li><a href="#trunkSourcebmallocbmallocXLargeRangeh">trunk/Source/bmalloc/bmalloc/XLargeRange.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsMallocBenchMallocBenchxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -433,6 +433,7 @@
</span><span class="cx">                                 GCC_PRECOMPILE_PREFIX_HEADER = NO;
</span><span class="cx">                                 PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
</span><span class="cx">                                 PRODUCT_NAME = &quot;$(TARGET_NAME)&quot;;
</span><ins>+                                SDKROOT = iphoneos.internal;
</ins><span class="cx">                         };
</span><span class="cx">                         name = Debug;
</span><span class="cx">                 };
</span><span class="lines">@@ -448,6 +449,7 @@
</span><span class="cx">                                 );
</span><span class="cx">                                 PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
</span><span class="cx">                                 PRODUCT_NAME = &quot;$(TARGET_NAME)&quot;;
</span><ins>+                                SDKROOT = iphoneos.internal;
</ins><span class="cx">                         };
</span><span class="cx">                         name = Release;
</span><span class="cx">                 };
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchrunmallocbenchmarks"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/run-malloc-benchmarks (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/run-malloc-benchmarks        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/PerformanceTests/MallocBench/run-malloc-benchmarks        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -7,24 +7,6 @@
</span><span class="cx"> $productDir = `perl -e 'use lib \&quot;#{$binDir}/../../Tools/Scripts\&quot;; use webkitdirs; print productDir()'`
</span><span class="cx"> 
</span><span class="cx"> $benchmarks_all = [
</span><del>-    # Single-threaded benchmarks.
-    &quot;churn&quot;,
-    &quot;list_allocate&quot;,
-    &quot;tree_allocate&quot;,
-    &quot;tree_churn&quot;,
-    &quot;fragment&quot;,
-    &quot;fragment_iterate&quot;,
-    &quot;medium&quot;,
-    &quot;big&quot;,
-
-    # Benchmarks based on browser recordings.
-    &quot;facebook&quot;,
-    &quot;reddit&quot;,
-    &quot;flickr&quot;,
-    &quot;theverge&quot;,
-    &quot;nimlang&quot;,
-
-    # Multi-threaded benchmark variants.
</del><span class="cx">     &quot;message_one&quot;,
</span><span class="cx">     &quot;message_many&quot;,
</span><span class="cx">     &quot;churn --parallel&quot;,
</span><span class="lines">@@ -31,27 +13,10 @@
</span><span class="cx">     &quot;list_allocate --parallel&quot;,
</span><span class="cx">     &quot;tree_allocate --parallel&quot;,
</span><span class="cx">     &quot;tree_churn --parallel&quot;,
</span><del>-    # &quot;facebook --parallel&quot;,
-    # &quot;reddit --parallel&quot;,
-    # &quot;flickr --parallel&quot;,
-    # &quot;theverge --parallel&quot;,
-    # &quot;nimlang --use-thread-id&quot;,
-    &quot;fragment --parallel&quot;,
-    &quot;fragment_iterate --parallel&quot;,
-
-    # These tests often crash TCMalloc: &lt;rdar://problem/13657137&gt;.
-    &quot;medium --parallel&quot;,
-    &quot;big --parallel&quot;,
-
-    # Enable these tests to test memory footprint. The way they run is not
-    # really compatible with throughput testing.
-    # &quot;reddit_memory_warning --runs 0&quot;,
-    # &quot;flickr_memory_warning --runs 0&quot;,
-    # &quot;theverge_memory_warning --runs 0&quot;,
-
-    # Enable this test to test shrinking back down from a large heap while a process remains active.
-    # The way it runs is not really compatible with throughput testing.
-    # &quot;balloon&quot;
</del><ins>+    &quot;facebook --parallel&quot;,
+    &quot;reddit --parallel&quot;,
+    &quot;flickr --parallel&quot;,
+    &quot;theverge --parallel&quot;,
</ins><span class="cx"> ]
</span><span class="cx"> 
</span><span class="cx"> $benchmarks_memory = [
</span></span></pre></div>
<a id="trunkSourcebmallocChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/ChangeLog (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/ChangeLog        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/ChangeLog        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-08-26  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        Renamed XLarge* =&gt; Large*
+        https://bugs.webkit.org/show_bug.cgi?id=161261
+
+        Reviewed by Andreas Kling.
+
+        XLarge is not a thing anymore: We just have Small and Large.
+
+        * bmalloc.xcodeproj/project.pbxproj:
+        * bmalloc/Heap.cpp:
+        (bmalloc::Heap::splitAndAllocate):
+        (bmalloc::Heap::tryAllocateLarge):
+        (bmalloc::Heap::shrinkLarge):
+        (bmalloc::Heap::deallocateLarge):
+        * bmalloc/Heap.h:
+        * bmalloc/LargeMap.cpp: Copied from Source/bmalloc/bmalloc/XLargeMap.cpp.
+        (bmalloc::LargeMap::remove):
+        (bmalloc::LargeMap::add):
+        (bmalloc::XLargeMap::remove): Deleted.
+        (bmalloc::XLargeMap::add): Deleted.
+        * bmalloc/LargeMap.h: Copied from Source/bmalloc/bmalloc/XLargeMap.h.
+        (bmalloc::LargeMap::ranges):
+        (bmalloc::XLargeMap::ranges): Deleted.
+        * bmalloc/LargeRange.h: Copied from Source/bmalloc/bmalloc/XLargeRange.h.
+        (bmalloc::LargeRange::LargeRange):
+        (bmalloc::LargeRange::operator&lt;):
+        (bmalloc::canMerge):
+        (bmalloc::merge):
+        (bmalloc::LargeRange::split):
+        (bmalloc::XLargeRange::XLargeRange): Deleted.
+        (bmalloc::XLargeRange::operator&lt;): Deleted.
+        (bmalloc::XLargeRange::split): Deleted.
+        * bmalloc/VMHeap.cpp:
+        (bmalloc::VMHeap::tryAllocateLargeChunk):
+        * bmalloc/VMHeap.h:
+        * bmalloc/XLargeMap.cpp: Removed.
+        * bmalloc/XLargeMap.h: Removed.
+        * bmalloc/XLargeRange.h: Removed.
+
</ins><span class="cx"> 2016-08-26  Gavin Barraclough  &lt;barraclough@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         bmalloc: speed up the lock slow path
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Heap.cpp (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Heap.cpp        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/bmalloc/Heap.cpp        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -305,21 +305,21 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-XLargeRange Heap::splitAndAllocate(XLargeRange&amp; range, size_t alignment, size_t size)
</del><ins>+LargeRange Heap::splitAndAllocate(LargeRange&amp; range, size_t alignment, size_t size)
</ins><span class="cx"> {
</span><del>-    XLargeRange prev;
-    XLargeRange next;
</del><ins>+    LargeRange prev;
+    LargeRange next;
</ins><span class="cx"> 
</span><span class="cx">     size_t alignmentMask = alignment - 1;
</span><span class="cx">     if (test(range.begin(), alignmentMask)) {
</span><span class="cx">         size_t prefixSize = roundUpToMultipleOf(alignment, range.begin()) - range.begin();
</span><del>-        std::pair&lt;XLargeRange, XLargeRange&gt; pair = range.split(prefixSize);
</del><ins>+        std::pair&lt;LargeRange, LargeRange&gt; pair = range.split(prefixSize);
</ins><span class="cx">         prev = pair.first;
</span><span class="cx">         range = pair.second;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (range.size() - size &gt; size / pageSizeWasteFactor) {
</span><del>-        std::pair&lt;XLargeRange, XLargeRange&gt; pair = range.split(size);
</del><ins>+        std::pair&lt;LargeRange, LargeRange&gt; pair = range.split(size);
</ins><span class="cx">         range = pair.first;
</span><span class="cx">         next = pair.second;
</span><span class="cx">     }
</span><span class="lines">@@ -357,7 +357,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     alignment = roundedAlignment;
</span><span class="cx"> 
</span><del>-    XLargeRange range = m_largeFree.remove(alignment, size);
</del><ins>+    LargeRange range = m_largeFree.remove(alignment, size);
</ins><span class="cx">     if (!range) {
</span><span class="cx">         range = m_vmHeap.tryAllocateLargeChunk(lock, alignment, size);
</span><span class="cx">         if (!range)
</span><span class="lines">@@ -392,7 +392,7 @@
</span><span class="cx">     BASSERT(object.size() &gt; newSize);
</span><span class="cx"> 
</span><span class="cx">     size_t size = m_largeAllocated.remove(object.begin());
</span><del>-    XLargeRange range = XLargeRange(object, size);
</del><ins>+    LargeRange range = LargeRange(object, size);
</ins><span class="cx">     splitAndAllocate(range, alignment, newSize);
</span><span class="cx"> 
</span><span class="cx">     m_scavenger.run();
</span><span class="lines">@@ -401,7 +401,7 @@
</span><span class="cx"> void Heap::deallocateLarge(std::lock_guard&lt;StaticMutex&gt;&amp;, void* object)
</span><span class="cx"> {
</span><span class="cx">     size_t size = m_largeAllocated.remove(object);
</span><del>-    m_largeFree.add(XLargeRange(object, size, size));
</del><ins>+    m_largeFree.add(LargeRange(object, size, size));
</ins><span class="cx">     
</span><span class="cx">     m_scavenger.run();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocHeaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/Heap.h (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/Heap.h        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/bmalloc/Heap.h        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;AsyncTask.h&quot;
</span><span class="cx"> #include &quot;BumpRange.h&quot;
</span><span class="cx"> #include &quot;Environment.h&quot;
</span><ins>+#include &quot;LargeMap.h&quot;
</ins><span class="cx"> #include &quot;LineMetadata.h&quot;
</span><span class="cx"> #include &quot;List.h&quot;
</span><span class="cx"> #include &quot;Map.h&quot;
</span><span class="lines">@@ -38,7 +39,6 @@
</span><span class="cx"> #include &quot;SmallPage.h&quot;
</span><span class="cx"> #include &quot;VMHeap.h&quot;
</span><span class="cx"> #include &quot;Vector.h&quot;
</span><del>-#include &quot;XLargeMap.h&quot;
</del><span class="cx"> #include &lt;array&gt;
</span><span class="cx"> #include &lt;mutex&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">     void mergeLargeLeft(EndTag*&amp;, BeginTag*&amp;, Range&amp;, bool&amp; inVMHeap);
</span><span class="cx">     void mergeLargeRight(EndTag*&amp;, BeginTag*&amp;, Range&amp;, bool&amp; inVMHeap);
</span><span class="cx"> 
</span><del>-    XLargeRange splitAndAllocate(XLargeRange&amp;, size_t alignment, size_t);
</del><ins>+    LargeRange splitAndAllocate(LargeRange&amp;, size_t alignment, size_t);
</ins><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><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">     std::array&lt;List&lt;SmallPage&gt;, pageClassCount&gt; m_smallPages;
</span><span class="cx"> 
</span><span class="cx">     Map&lt;void*, size_t, LargeObjectHash&gt; m_largeAllocated;
</span><del>-    XLargeMap m_largeFree;
</del><ins>+    LargeMap m_largeFree;
</ins><span class="cx"> 
</span><span class="cx">     Map&lt;Chunk*, ObjectType, ChunkHash&gt; m_objectTypes;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocLargeMapcppfromrev204993trunkSourcebmallocbmallocXLargeMapcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/bmalloc/bmalloc/LargeMap.cpp (from rev 204993, trunk/Source/bmalloc/bmalloc/XLargeMap.cpp) (0 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/LargeMap.cpp                                (rev 0)
+++ trunk/Source/bmalloc/bmalloc/LargeMap.cpp        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ * Copyright (C) 2016 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 &quot;LargeMap.h&quot;
+#include &lt;utility&gt;
+
+namespace bmalloc {
+
+LargeRange LargeMap::remove(size_t alignment, size_t size)
+{
+    size_t alignmentMask = alignment - 1;
+
+    LargeRange* candidate = m_free.end();
+    for (LargeRange* it = m_free.begin(); it != m_free.end(); ++it) {
+        if (it-&gt;size() &lt; size)
+            continue;
+
+        if (candidate != m_free.end() &amp;&amp; candidate-&gt;begin() &lt; it-&gt;begin())
+            continue;
+
+        if (test(it-&gt;begin(), alignmentMask)) {
+            char* aligned = roundUpToMultipleOf(alignment, it-&gt;begin());
+            if (aligned &lt; it-&gt;begin()) // Check for overflow.
+                continue;
+
+            char* alignedEnd = aligned + size;
+            if (alignedEnd &lt; aligned) // Check for overflow.
+                continue;
+
+            if (alignedEnd &gt; it-&gt;end())
+                continue;
+        }
+
+        candidate = it;
+    }
+    
+    if (candidate == m_free.end())
+        return LargeRange();
+
+    return m_free.pop(candidate);
+}
+
+void LargeMap::add(const LargeRange&amp; range)
+{
+    LargeRange merged = range;
+
+    for (size_t i = 0; i &lt; m_free.size(); ++i) {
+        if (!canMerge(merged, m_free[i]))
+            continue;
+
+        merged = merge(merged, m_free.pop(i--));
+    }
+    
+    m_free.push(merged);
+}
+
+} // namespace bmalloc
</ins></span></pre></div>
<a id="trunkSourcebmallocbmallocLargeMaphfromrev204993trunkSourcebmallocbmallocXLargeMaph"></a>
<div class="copfile"><h4>Copied: trunk/Source/bmalloc/bmalloc/LargeMap.h (from rev 204993, trunk/Source/bmalloc/bmalloc/XLargeMap.h) (0 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/LargeMap.h                                (rev 0)
+++ trunk/Source/bmalloc/bmalloc/LargeMap.h        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2016 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 LargeMap_h
+#define LargeMap_h
+
+#include &quot;LargeRange.h&quot;
+#include &quot;Vector.h&quot;
+#include &lt;algorithm&gt;
+
+namespace bmalloc {
+
+class LargeMap {
+public:
+    void add(const LargeRange&amp;);
+    LargeRange remove(size_t alignment, size_t);
+    Vector&lt;LargeRange&gt;&amp; ranges() { return m_free; }
+
+private:
+    Vector&lt;LargeRange&gt; m_free;
+};
+
+} // namespace bmalloc
+
+#endif // LargeMap_h
</ins></span></pre></div>
<a id="trunkSourcebmallocbmallocLargeRangehfromrev204993trunkSourcebmallocbmallocXLargeRangeh"></a>
<div class="copfile"><h4>Copied: trunk/Source/bmalloc/bmalloc/LargeRange.h (from rev 204993, trunk/Source/bmalloc/bmalloc/XLargeRange.h) (0 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/LargeRange.h                                (rev 0)
+++ trunk/Source/bmalloc/bmalloc/LargeRange.h        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -0,0 +1,110 @@
</span><ins>+/*
+ * Copyright (C) 2016 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 LargeRange_h
+#define LargeRange_h
+
+#include &quot;BAssert.h&quot;
+#include &quot;Range.h&quot;
+
+namespace bmalloc {
+
+class LargeRange : public Range {
+public:
+    LargeRange()
+        : Range()
+        , m_physicalSize(0)
+    {
+    }
+
+    LargeRange(const Range&amp; other, size_t physicalSize)
+        : Range(other)
+        , m_physicalSize(physicalSize)
+    {
+    }
+
+    LargeRange(void* begin, size_t size, size_t physicalSize)
+        : Range(begin, size)
+        , m_physicalSize(physicalSize)
+    {
+    }
+
+    size_t physicalSize() const { return m_physicalSize; }
+    void setPhysicalSize(size_t physicalSize) { m_physicalSize = physicalSize; }
+
+    std::pair&lt;LargeRange, LargeRange&gt; split(size_t) const;
+
+    bool operator&lt;(const void* other) const { return begin() &lt; other; }
+    bool operator&lt;(const LargeRange&amp; other) const { return begin() &lt; other.begin(); }
+
+private:
+    size_t m_physicalSize;
+};
+
+inline bool canMerge(const LargeRange&amp; a, const LargeRange&amp; b)
+{
+    if (a.end() == b.begin())
+        return true;
+    
+    if (b.end() == a.begin())
+        return true;
+    
+    return false;
+}
+
+inline LargeRange merge(const LargeRange&amp; a, const LargeRange&amp; b)
+{
+    const LargeRange&amp; left = std::min(a, b);
+    if (left.size() == left.physicalSize()) {
+        return LargeRange(
+            left.begin(),
+            a.size() + b.size(),
+            a.physicalSize() + b.physicalSize());
+    }
+
+    return LargeRange(
+        left.begin(),
+        a.size() + b.size(),
+        left.physicalSize());
+}
+
+inline std::pair&lt;LargeRange, LargeRange&gt; LargeRange::split(size_t size) const
+{
+    BASSERT(size &lt;= this-&gt;size());
+    
+    if (size &lt;= physicalSize()) {
+        LargeRange left(begin(), size, size);
+        LargeRange right(left.end(), this-&gt;size() - size, physicalSize() - size);
+        return std::make_pair(left, right);
+    }
+
+    LargeRange left(begin(), size, physicalSize());
+    LargeRange right(left.end(), this-&gt;size() - size, 0);
+    return std::make_pair(left, right);
+}
+
+} // namespace bmalloc
+
+#endif // LargeRange_h
</ins></span></pre></div>
<a id="trunkSourcebmallocbmallocVMHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/VMHeap.cpp (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/VMHeap.cpp        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/bmalloc/VMHeap.cpp        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -29,23 +29,23 @@
</span><span class="cx"> 
</span><span class="cx"> namespace bmalloc {
</span><span class="cx"> 
</span><del>-XLargeRange VMHeap::tryAllocateLargeChunk(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t alignment, size_t size)
</del><ins>+LargeRange VMHeap::tryAllocateLargeChunk(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t alignment, size_t size)
</ins><span class="cx"> {
</span><span class="cx">     // We allocate VM in aligned multiples to increase the chances that
</span><span class="cx">     // the OS will provide contiguous ranges that we can merge.
</span><span class="cx">     size_t roundedAlignment = roundUpToMultipleOf&lt;chunkSize&gt;(alignment);
</span><span class="cx">     if (roundedAlignment &lt; alignment) // Check for overflow
</span><del>-        return XLargeRange();
</del><ins>+        return LargeRange();
</ins><span class="cx">     alignment = roundedAlignment;
</span><span class="cx"> 
</span><span class="cx">     size_t roundedSize = roundUpToMultipleOf&lt;chunkSize&gt;(size);
</span><span class="cx">     if (roundedSize &lt; size) // Check for overflow
</span><del>-        return XLargeRange();
</del><ins>+        return LargeRange();
</ins><span class="cx">     size = roundedSize;
</span><span class="cx"> 
</span><span class="cx">     void* memory = tryVMAllocate(alignment, size);
</span><span class="cx">     if (!memory)
</span><del>-        return XLargeRange();
</del><ins>+        return LargeRange();
</ins><span class="cx"> 
</span><span class="cx">     Chunk* chunk = static_cast&lt;Chunk*&gt;(memory);
</span><span class="cx">     
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     m_zone.addRange(Range(chunk-&gt;bytes(), size));
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    return XLargeRange(chunk-&gt;bytes(), size, 0);
</del><ins>+    return LargeRange(chunk-&gt;bytes(), size, 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void VMHeap::allocateSmallChunk(std::lock_guard&lt;StaticMutex&gt;&amp; lock, size_t pageClass)
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocVMHeaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/VMHeap.h (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/VMHeap.h        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/bmalloc/VMHeap.h        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Chunk.h&quot;
</span><span class="cx"> #include &quot;FixedVector.h&quot;
</span><ins>+#include &quot;LargeRange.h&quot;
</ins><span class="cx"> #include &quot;Map.h&quot;
</span><span class="cx"> #include &quot;Vector.h&quot;
</span><del>-#include &quot;XLargeRange.h&quot;
</del><span class="cx"> #if BOS(DARWIN)
</span><span class="cx"> #include &quot;Zone.h&quot;
</span><span class="cx"> #endif
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     SmallPage* allocateSmallPage(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t);
</span><span class="cx">     void deallocateSmallPage(std::unique_lock&lt;StaticMutex&gt;&amp;, size_t, SmallPage*);
</span><span class="cx"> 
</span><del>-    XLargeRange tryAllocateLargeChunk(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t alignment, size_t);
</del><ins>+    LargeRange tryAllocateLargeChunk(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t alignment, size_t);
</ins><span class="cx">     
</span><span class="cx"> private:
</span><span class="cx">     void allocateSmallChunk(std::lock_guard&lt;StaticMutex&gt;&amp;, size_t);
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocXLargeMapcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/bmalloc/bmalloc/XLargeMap.cpp (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/XLargeMap.cpp        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/bmalloc/XLargeMap.cpp        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -1,79 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 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 &quot;XLargeMap.h&quot;
-#include &lt;utility&gt;
-
-namespace bmalloc {
-
-XLargeRange XLargeMap::remove(size_t alignment, size_t size)
-{
-    size_t alignmentMask = alignment - 1;
-
-    XLargeRange* candidate = m_free.end();
-    for (XLargeRange* it = m_free.begin(); it != m_free.end(); ++it) {
-        if (it-&gt;size() &lt; size)
-            continue;
-
-        if (candidate != m_free.end() &amp;&amp; candidate-&gt;begin() &lt; it-&gt;begin())
-            continue;
-
-        if (test(it-&gt;begin(), alignmentMask)) {
-            char* aligned = roundUpToMultipleOf(alignment, it-&gt;begin());
-            if (aligned &lt; it-&gt;begin()) // Check for overflow.
-                continue;
-
-            char* alignedEnd = aligned + size;
-            if (alignedEnd &lt; aligned) // Check for overflow.
-                continue;
-
-            if (alignedEnd &gt; it-&gt;end())
-                continue;
-        }
-
-        candidate = it;
-    }
-    
-    if (candidate == m_free.end())
-        return XLargeRange();
-
-    return m_free.pop(candidate);
-}
-
-void XLargeMap::add(const XLargeRange&amp; range)
-{
-    XLargeRange merged = range;
-
-    for (size_t i = 0; i &lt; m_free.size(); ++i) {
-        if (!canMerge(merged, m_free[i]))
-            continue;
-
-        merged = merge(merged, m_free.pop(i--));
-    }
-    
-    m_free.push(merged);
-}
-
-} // namespace bmalloc
</del></span></pre></div>
<a id="trunkSourcebmallocbmallocXLargeMaph"></a>
<div class="delfile"><h4>Deleted: trunk/Source/bmalloc/bmalloc/XLargeMap.h (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/XLargeMap.h        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/bmalloc/XLargeMap.h        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -1,47 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 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 XLargeMap_h
-#define XLargeMap_h
-
-#include &quot;Vector.h&quot;
-#include &quot;XLargeRange.h&quot;
-#include &lt;algorithm&gt;
-
-namespace bmalloc {
-
-class XLargeMap {
-public:
-    void add(const XLargeRange&amp;);
-    XLargeRange remove(size_t alignment, size_t);
-    Vector&lt;XLargeRange&gt;&amp; ranges() { return m_free; }
-
-private:
-    Vector&lt;XLargeRange&gt; m_free;
-};
-
-} // namespace bmalloc
-
-#endif // XLargeMap_h
</del></span></pre></div>
<a id="trunkSourcebmallocbmallocXLargeRangeh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/bmalloc/bmalloc/XLargeRange.h (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/XLargeRange.h        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/bmalloc/XLargeRange.h        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -1,107 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 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 XLargeRange_h
-#define XLargeRange_h
-
-namespace bmalloc {
-
-class XLargeRange : public Range {
-public:
-    XLargeRange()
-        : Range()
-        , m_physicalSize(0)
-    {
-    }
-
-    XLargeRange(const Range&amp; other, size_t physicalSize)
-        : Range(other)
-        , m_physicalSize(physicalSize)
-    {
-    }
-
-    XLargeRange(void* begin, size_t size, size_t physicalSize)
-        : Range(begin, size)
-        , m_physicalSize(physicalSize)
-    {
-    }
-
-    size_t physicalSize() const { return m_physicalSize; }
-    void setPhysicalSize(size_t physicalSize) { m_physicalSize = physicalSize; }
-
-    std::pair&lt;XLargeRange, XLargeRange&gt; split(size_t) const;
-
-    bool operator&lt;(const void* other) const { return begin() &lt; other; }
-    bool operator&lt;(const XLargeRange&amp; other) const { return begin() &lt; other.begin(); }
-
-private:
-    size_t m_physicalSize;
-};
-
-inline bool canMerge(const XLargeRange&amp; a, const XLargeRange&amp; b)
-{
-    if (a.end() == b.begin())
-        return true;
-    
-    if (b.end() == a.begin())
-        return true;
-    
-    return false;
-}
-
-inline XLargeRange merge(const XLargeRange&amp; a, const XLargeRange&amp; b)
-{
-    const XLargeRange&amp; left = std::min(a, b);
-    if (left.size() == left.physicalSize()) {
-        return XLargeRange(
-            left.begin(),
-            a.size() + b.size(),
-            a.physicalSize() + b.physicalSize());
-    }
-
-    return XLargeRange(
-        left.begin(),
-        a.size() + b.size(),
-        left.physicalSize());
-}
-
-inline std::pair&lt;XLargeRange, XLargeRange&gt; XLargeRange::split(size_t size) const
-{
-    BASSERT(size &lt;= this-&gt;size());
-    
-    if (size &lt;= physicalSize()) {
-        XLargeRange left(begin(), size, size);
-        XLargeRange right(left.end(), this-&gt;size() - size, physicalSize() - size);
-        return std::make_pair(left, right);
-    }
-
-    XLargeRange left(begin(), size, physicalSize());
-    XLargeRange right(left.end(), this-&gt;size() - size, 0);
-    return std::make_pair(left, right);
-}
-
-} // namespace bmalloc
-
-#endif // XLargeRange_h
</del></span></pre></div>
<a id="trunkSourcebmallocbmallocxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj (205031 => 205032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj        2016-08-26 18:12:56 UTC (rev 205031)
+++ trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj        2016-08-26 20:18:00 UTC (rev 205032)
</span><span class="lines">@@ -19,13 +19,13 @@
</span><span class="cx">                 1448C30018F3754600502839 /* mbmalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1448C2FF18F3754300502839 /* mbmalloc.cpp */; };
</span><span class="cx">                 1448C30118F3754C00502839 /* bmalloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 1448C2FE18F3754300502839 /* bmalloc.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 144BE11F1CA346520099C8C0 /* Object.h in Headers */ = {isa = PBXBuildFile; fileRef = 144BE11E1CA346520099C8C0 /* Object.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                144C07F41C7B70260051BB6A /* XLargeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 144C07F21C7B70260051BB6A /* XLargeMap.cpp */; };
-                144C07F51C7B70260051BB6A /* XLargeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 144C07F31C7B70260051BB6A /* XLargeMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                144C07F41C7B70260051BB6A /* LargeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 144C07F21C7B70260051BB6A /* LargeMap.cpp */; };
+                144C07F51C7B70260051BB6A /* LargeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 144C07F31C7B70260051BB6A /* LargeMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 147DC6E31CA5B70B00724E8D /* Chunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 147DC6E21CA5B70B00724E8D /* Chunk.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14895D911A3A319C0006235D /* Environment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14895D8F1A3A319C0006235D /* Environment.cpp */; };
</span><span class="cx">                 14895D921A3A319C0006235D /* Environment.h in Headers */ = {isa = PBXBuildFile; fileRef = 14895D901A3A319C0006235D /* Environment.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14C8992B1CC485E70027A057 /* Map.h in Headers */ = {isa = PBXBuildFile; fileRef = 14C8992A1CC485E70027A057 /* Map.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                14C8992D1CC578330027A057 /* XLargeRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 14C8992C1CC578330027A057 /* XLargeRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                14C8992D1CC578330027A057 /* LargeRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 14C8992C1CC578330027A057 /* LargeRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 14C919C918FCC59F0028DB43 /* BPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = 14C919C818FCC59F0028DB43 /* BPlatform.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14CC394C18EA8858004AFE34 /* libbmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14F271BE18EA3963008C152F /* libbmalloc.a */; };
</span><span class="cx">                 14DD789018F48CEB00950702 /* Sizes.h in Headers */ = {isa = PBXBuildFile; fileRef = 145F6874179DF84100D65598 /* Sizes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -92,8 +92,8 @@
</span><span class="cx">                 1448C2FE18F3754300502839 /* bmalloc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = bmalloc.h; path = bmalloc/bmalloc.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1448C2FF18F3754300502839 /* mbmalloc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = mbmalloc.cpp; path = bmalloc/mbmalloc.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 144BE11E1CA346520099C8C0 /* Object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Object.h; path = bmalloc/Object.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                144C07F21C7B70260051BB6A /* XLargeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XLargeMap.cpp; path = bmalloc/XLargeMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                144C07F31C7B70260051BB6A /* XLargeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XLargeMap.h; path = bmalloc/XLargeMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                144C07F21C7B70260051BB6A /* LargeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LargeMap.cpp; path = bmalloc/LargeMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                144C07F31C7B70260051BB6A /* LargeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LargeMap.h; path = bmalloc/LargeMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><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><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx">                 14B650C718F39F4800751968 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14B650C918F3A04200751968 /* mbmalloc.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = mbmalloc.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14C8992A1CC485E70027A057 /* Map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Map.h; path = bmalloc/Map.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                14C8992C1CC578330027A057 /* XLargeRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XLargeRange.h; path = bmalloc/XLargeRange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                14C8992C1CC578330027A057 /* LargeRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LargeRange.h; path = bmalloc/LargeRange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 14C919C818FCC59F0028DB43 /* BPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BPlatform.h; path = bmalloc/BPlatform.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14CC394418EA8743004AFE34 /* libmbmalloc.dylib */ = {isa = PBXFileReference; explicitFileType = &quot;compiled.mach-o.dylib&quot;; includeInIndex = 0; path = libmbmalloc.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">                 14D9DB4517F2447100EAAB79 /* FixedVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = FixedVector.h; path = bmalloc/FixedVector.h; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
</span><span class="lines">@@ -190,9 +190,9 @@
</span><span class="cx">                 147AAA9C18CE6010002201E4 /* heap: large */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                144C07F21C7B70260051BB6A /* XLargeMap.cpp */,
-                                144C07F31C7B70260051BB6A /* XLargeMap.h */,
-                                14C8992C1CC578330027A057 /* XLargeRange.h */,
</del><ins>+                                144C07F21C7B70260051BB6A /* LargeMap.cpp */,
+                                144C07F31C7B70260051BB6A /* LargeMap.h */,
+                                14C8992C1CC578330027A057 /* LargeRange.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = &quot;heap: large&quot;;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -322,8 +322,8 @@
</span><span class="cx">                                 14C8992B1CC485E70027A057 /* Map.h in Headers */,
</span><span class="cx">                                 14DD78BD18F48D6B00950702 /* SmallPage.h in Headers */,
</span><span class="cx">                                 14DD78C818F48D7500950702 /* FixedVector.h in Headers */,
</span><del>-                                14C8992D1CC578330027A057 /* XLargeRange.h in Headers */,
-                                144C07F51C7B70260051BB6A /* XLargeMap.h in Headers */,
</del><ins>+                                14C8992D1CC578330027A057 /* LargeRange.h in Headers */,
+                                144C07F51C7B70260051BB6A /* LargeMap.h in Headers */,
</ins><span class="cx">                                 147DC6E31CA5B70B00724E8D /* Chunk.h in Headers */,
</span><span class="cx">                                 14DD78BC18F48D6B00950702 /* SmallLine.h in Headers */,
</span><span class="cx">                                 14DD789818F48D4A00950702 /* Allocator.h in Headers */,
</span><span class="lines">@@ -417,7 +417,7 @@
</span><span class="cx">                                 4426E2801C838EE0008EB042 /* Logging.cpp in Sources */,
</span><span class="cx">                                 14F271C718EA3990008C152F /* Heap.cpp in Sources */,
</span><span class="cx">                                 14F271C918EA3990008C152F /* VMHeap.cpp in Sources */,
</span><del>-                                144C07F41C7B70260051BB6A /* XLargeMap.cpp in Sources */,
</del><ins>+                                144C07F41C7B70260051BB6A /* LargeMap.cpp in Sources */,
</ins><span class="cx">                                 14F271C818EA3990008C152F /* ObjectType.cpp in Sources */,
</span><span class="cx">                                 14F271C518EA397E008C152F /* Deallocator.cpp in Sources */,
</span><span class="cx">                                 14F271C418EA397B008C152F /* Cache.cpp in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>