<!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>[167355] trunk/Source/WTF</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/167355">167355</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2014-04-16 10:48:56 -0700 (Wed, 16 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>WTF should have an optional mbmalloc target so we can benchmark FastMalloc
https://bugs.webkit.org/show_bug.cgi?id=131662

Reviewed by Darin Adler.

* WTF.xcodeproj/project.pbxproj: Added the target.
* wtf/mbmalloc.cpp: Added. Implements the libmbmalloc.dylib API required
by MallocBench.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFWTFxcodeprojprojectpbxproj">trunk/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWTFConfigurationsmbmallocxcconfig">trunk/Source/WTF/Configurations/mbmalloc.xcconfig</a></li>
<li><a href="#trunkSourceWTFwtfmbmalloccpp">trunk/Source/WTF/wtf/mbmalloc.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (167354 => 167355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2014-04-16 17:48:22 UTC (rev 167354)
+++ trunk/Source/WTF/ChangeLog        2014-04-16 17:48:56 UTC (rev 167355)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-04-14  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        WTF should have an optional mbmalloc target so we can benchmark FastMalloc
+        https://bugs.webkit.org/show_bug.cgi?id=131662
+
+        Reviewed by Darin Adler.
+
+        * WTF.xcodeproj/project.pbxproj: Added the target.
+        * wtf/mbmalloc.cpp: Added. Implements the libmbmalloc.dylib API required
+        by MallocBench.
+
</ins><span class="cx"> 2014-04-16  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make Vector::takeLast work with move-only types (and optimize for types where move is faster)
</span></span></pre></div>
<a id="trunkSourceWTFConfigurationsmbmallocxcconfig"></a>
<div class="addfile"><h4>Added: trunk/Source/WTF/Configurations/mbmalloc.xcconfig (0 => 167355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/Configurations/mbmalloc.xcconfig                                (rev 0)
+++ trunk/Source/WTF/Configurations/mbmalloc.xcconfig        2014-04-16 17:48:56 UTC (rev 167355)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+// 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. 
+
+EXECUTABLE_PREFIX = lib;
+INSTALL_PATH_ACTUAL = /usr/local/lib;
+PRODUCT_NAME = mbmalloc;
+
+GCC_SYMBOLS_PRIVATE_EXTERN = YES;
</ins></span></pre></div>
<a id="trunkSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (167354 => 167355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2014-04-16 17:48:22 UTC (rev 167354)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2014-04-16 17:48:56 UTC (rev 167355)
</span><span class="lines">@@ -43,6 +43,10 @@
</span><span class="cx">                 14022F4118F5C3FC007FF0EB /* libbmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14022F4018F5C3FC007FF0EB /* libbmalloc.a */; };
</span><span class="cx">                 143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143F611D1565F0F900DB514A /* RAMSize.cpp */; };
</span><span class="cx">                 143F61201565F0F900DB514A /* RAMSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 143F611E1565F0F900DB514A /* RAMSize.h */; settings = {ATTRIBUTES = (); }; };
</span><ins>+                1447AEC618FCE57700B3D7FF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1447AEC518FCE57700B3D7FF /* Foundation.framework */; };
+                1447AEC718FCE58000B3D7FF /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D247B6214689B8600E78B76 /* libWTF.a */; };
+                1447AEC918FCE59400B3D7FF /* mbmalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1447AEC818FCE59400B3D7FF /* mbmalloc.cpp */; };
+                1447AECB18FCE5B900B3D7FF /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1447AECA18FCE5B900B3D7FF /* libicucore.dylib */; };
</ins><span class="cx">                 1469419216EAAF6D0024E146 /* RunLoopTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1469419016EAAF6D0024E146 /* RunLoopTimer.h */; settings = {ATTRIBUTES = (); }; };
</span><span class="cx">                 1469419316EAAF6D0024E146 /* RunLoopTimerCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1469419116EAAF6D0024E146 /* RunLoopTimerCF.cpp */; };
</span><span class="cx">                 1469419616EAAFF80024E146 /* SchedulePair.h in Headers */ = {isa = PBXBuildFile; fileRef = 1469419416EAAFF80024E146 /* SchedulePair.h */; };
</span><span class="lines">@@ -279,6 +283,13 @@
</span><span class="cx"> /* End PBXBuildFile section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXContainerItemProxy section */
</span><ins>+                1447AEC318FCE57000B3D7FF /* PBXContainerItemProxy */ = {
+                        isa = PBXContainerItemProxy;
+                        containerPortal = 5D247B5914689B8600E78B76 /* Project object */;
+                        proxyType = 1;
+                        remoteGlobalIDString = 5D247B6114689B8600E78B76;
+                        remoteInfo = WTF;
+                };
</ins><span class="cx">                 65AFA28D1630B99E003D723C /* PBXContainerItemProxy */ = {
</span><span class="cx">                         isa = PBXContainerItemProxy;
</span><span class="cx">                         containerPortal = 5D247B5914689B8600E78B76 /* Project object */;
</span><span class="lines">@@ -313,6 +324,10 @@
</span><span class="cx">                 14022F4018F5C3FC007FF0EB /* libbmalloc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbmalloc.a; path = libbmalloc.a; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">                 143F611D1565F0F900DB514A /* RAMSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RAMSize.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 143F611E1565F0F900DB514A /* RAMSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAMSize.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1447AEBE18FCE56900B3D7FF /* libmbmalloc.dylib */ = {isa = PBXFileReference; explicitFileType = &quot;compiled.mach-o.dylib&quot;; includeInIndex = 0; path = libmbmalloc.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+                1447AEC518FCE57700B3D7FF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = &quot;&lt;absolute&gt;&quot;; };
+                1447AEC818FCE59400B3D7FF /* mbmalloc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = mbmalloc.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1447AECA18FCE5B900B3D7FF /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = &quot;compiled.mach-o.dylib&quot;; name = libicucore.dylib; path = /usr/lib/libicucore.dylib; sourceTree = &quot;&lt;absolute&gt;&quot;; };
</ins><span class="cx">                 1469419016EAAF6D0024E146 /* RunLoopTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunLoopTimer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1469419116EAAF6D0024E146 /* RunLoopTimerCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunLoopTimerCF.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1469419416EAAFF80024E146 /* SchedulePair.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchedulePair.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -321,6 +336,7 @@
</span><span class="cx">                 1469419A16EAB10A0024E146 /* AutodrainedPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutodrainedPool.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1469419B16EAB10A0024E146 /* AutodrainedPoolMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AutodrainedPoolMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 149EF16216BBFE0D000A4331 /* TriState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriState.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                14C8279718FDD73400E1800C /* mbmalloc.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = mbmalloc.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaturatedArithmetic.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A1D8B9B173186CE00141DA4 /* FunctionDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FunctionDispatcher.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A1D8B9D1731879800141DA4 /* FunctionDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionDispatcher.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -559,6 +575,16 @@
</span><span class="cx"> /* End PBXFileReference section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXFrameworksBuildPhase section */
</span><ins>+                1447AEBB18FCE56900B3D7FF /* Frameworks */ = {
+                        isa = PBXFrameworksBuildPhase;
+                        buildActionMask = 2147483647;
+                        files = (
+                                1447AECB18FCE5B900B3D7FF /* libicucore.dylib in Frameworks */,
+                                1447AEC718FCE58000B3D7FF /* libWTF.a in Frameworks */,
+                                1447AEC618FCE57700B3D7FF /* Foundation.framework in Frameworks */,
+                        );
+                        runOnlyForDeploymentPostprocessing = 0;
+                };
</ins><span class="cx">                 5D247B5F14689B8600E78B76 /* Frameworks */ = {
</span><span class="cx">                         isa = PBXFrameworksBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="lines">@@ -598,6 +624,8 @@
</span><span class="cx">                 5D247B5714689B8600E78B76 = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                1447AECA18FCE5B900B3D7FF /* libicucore.dylib */,
+                                1447AEC518FCE57700B3D7FF /* Foundation.framework */,
</ins><span class="cx">                                 5D247B6D14689C4700E78B76 /* Configurations */,
</span><span class="cx">                                 14022F3F18F5C3E5007FF0EB /* Libraries */,
</span><span class="cx">                                 5D247B6314689B8600E78B76 /* Products */,
</span><span class="lines">@@ -609,6 +637,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 5D247B6214689B8600E78B76 /* libWTF.a */,
</span><ins>+                                1447AEBE18FCE56900B3D7FF /* libmbmalloc.dylib */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = Products;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -620,6 +649,7 @@
</span><span class="cx">                                 6541CAF41630DB26006D0DEC /* CopyWTFHeaders.xcconfig */,
</span><span class="cx">                                 5D247B7014689C4700E78B76 /* DebugRelease.xcconfig */,
</span><span class="cx">                                 44DEE74A152274BB00C6EC37 /* iOS.xcconfig */,
</span><ins>+                                14C8279718FDD73400E1800C /* mbmalloc.xcconfig */,
</ins><span class="cx">                                 5D247B7314689C4700E78B76 /* WTF.xcconfig */,
</span><span class="cx">                         );
</span><span class="cx">                         path = Configurations;
</span><span class="lines">@@ -746,6 +776,7 @@
</span><span class="cx">                                 A70DA0831799F04D00529A9B /* ListDump.h */,
</span><span class="cx">                                 A8A472C1151A825A004123FF /* ListHashSet.h */,
</span><span class="cx">                                 A8A472C3151A825A004123FF /* Locker.h */,
</span><ins>+                                1447AEC818FCE59400B3D7FF /* mbmalloc.cpp */,
</ins><span class="cx">                                 A8A472CA151A825B004123FF /* MD5.cpp */,
</span><span class="cx">                                 A8A472CB151A825B004123FF /* MD5.h */,
</span><span class="cx">                                 A8A472C6151A825A004123FF /* MainThread.cpp */,
</span><span class="lines">@@ -966,6 +997,13 @@
</span><span class="cx"> /* End PBXGroup section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXHeadersBuildPhase section */
</span><ins>+                1447AEBC18FCE56900B3D7FF /* Headers */ = {
+                        isa = PBXHeadersBuildPhase;
+                        buildActionMask = 2147483647;
+                        files = (
+                        );
+                        runOnlyForDeploymentPostprocessing = 0;
+                };
</ins><span class="cx">                 5D247B6014689B8600E78B76 /* Headers */ = {
</span><span class="cx">                         isa = PBXHeadersBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="lines">@@ -1152,6 +1190,24 @@
</span><span class="cx"> /* End PBXHeadersBuildPhase section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXNativeTarget section */
</span><ins>+                1447AEBD18FCE56900B3D7FF /* mbmalloc */ = {
+                        isa = PBXNativeTarget;
+                        buildConfigurationList = 1447AEC218FCE56900B3D7FF /* Build configuration list for PBXNativeTarget &quot;mbmalloc&quot; */;
+                        buildPhases = (
+                                1447AEBA18FCE56900B3D7FF /* Sources */,
+                                1447AEBB18FCE56900B3D7FF /* Frameworks */,
+                                1447AEBC18FCE56900B3D7FF /* Headers */,
+                        );
+                        buildRules = (
+                        );
+                        dependencies = (
+                                1447AEC418FCE57000B3D7FF /* PBXTargetDependency */,
+                        );
+                        name = mbmalloc;
+                        productName = mbmalloc;
+                        productReference = 1447AEBE18FCE56900B3D7FF /* libmbmalloc.dylib */;
+                        productType = &quot;com.apple.product-type.library.dynamic&quot;;
+                };
</ins><span class="cx">                 5D247B6114689B8600E78B76 /* WTF */ = {
</span><span class="cx">                         isa = PBXNativeTarget;
</span><span class="cx">                         buildConfigurationList = 5D247B6614689B8600E78B76 /* Build configuration list for PBXNativeTarget &quot;WTF&quot; */;
</span><span class="lines">@@ -1192,6 +1248,7 @@
</span><span class="cx">                         targets = (
</span><span class="cx">                                 5D247B6114689B8600E78B76 /* WTF */,
</span><span class="cx">                                 65AFA16F1630B977003D723C /* Copy WTF Headers */,
</span><ins>+                                1447AEBD18FCE56900B3D7FF /* mbmalloc */,
</ins><span class="cx">                         );
</span><span class="cx">                 };
</span><span class="cx"> /* End PBXProject section */
</span><span class="lines">@@ -1214,6 +1271,14 @@
</span><span class="cx"> /* End PBXShellScriptBuildPhase section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXSourcesBuildPhase section */
</span><ins>+                1447AEBA18FCE56900B3D7FF /* Sources */ = {
+                        isa = PBXSourcesBuildPhase;
+                        buildActionMask = 2147483647;
+                        files = (
+                                1447AEC918FCE59400B3D7FF /* mbmalloc.cpp in Sources */,
+                        );
+                        runOnlyForDeploymentPostprocessing = 0;
+                };
</ins><span class="cx">                 5D247B5E14689B8600E78B76 /* Sources */ = {
</span><span class="cx">                         isa = PBXSourcesBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="lines">@@ -1302,6 +1367,11 @@
</span><span class="cx"> /* End PBXSourcesBuildPhase section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXTargetDependency section */
</span><ins>+                1447AEC418FCE57000B3D7FF /* PBXTargetDependency */ = {
+                        isa = PBXTargetDependency;
+                        target = 5D247B6114689B8600E78B76 /* WTF */;
+                        targetProxy = 1447AEC318FCE57000B3D7FF /* PBXContainerItemProxy */;
+                };
</ins><span class="cx">                 65AFA28E1630B99E003D723C /* PBXTargetDependency */ = {
</span><span class="cx">                         isa = PBXTargetDependency;
</span><span class="cx">                         target = 65AFA16F1630B977003D723C /* Copy WTF Headers */;
</span><span class="lines">@@ -1310,6 +1380,27 @@
</span><span class="cx"> /* End PBXTargetDependency section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin XCBuildConfiguration section */
</span><ins>+                1447AEBF18FCE56900B3D7FF /* Debug */ = {
+                        isa = XCBuildConfiguration;
+                        baseConfigurationReference = 14C8279718FDD73400E1800C /* mbmalloc.xcconfig */;
+                        buildSettings = {
+                        };
+                        name = Debug;
+                };
+                1447AEC018FCE56900B3D7FF /* Release */ = {
+                        isa = XCBuildConfiguration;
+                        baseConfigurationReference = 14C8279718FDD73400E1800C /* mbmalloc.xcconfig */;
+                        buildSettings = {
+                        };
+                        name = Release;
+                };
+                1447AEC118FCE56900B3D7FF /* Production */ = {
+                        isa = XCBuildConfiguration;
+                        baseConfigurationReference = 14C8279718FDD73400E1800C /* mbmalloc.xcconfig */;
+                        buildSettings = {
+                        };
+                        name = Production;
+                };
</ins><span class="cx">                 5D247B6414689B8600E78B76 /* Debug */ = {
</span><span class="cx">                         isa = XCBuildConfiguration;
</span><span class="cx">                         baseConfigurationReference = 5D247B7014689C4700E78B76 /* DebugRelease.xcconfig */;
</span><span class="lines">@@ -1383,6 +1474,16 @@
</span><span class="cx"> /* End XCBuildConfiguration section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin XCConfigurationList section */
</span><ins>+                1447AEC218FCE56900B3D7FF /* Build configuration list for PBXNativeTarget &quot;mbmalloc&quot; */ = {
+                        isa = XCConfigurationList;
+                        buildConfigurations = (
+                                1447AEBF18FCE56900B3D7FF /* Debug */,
+                                1447AEC018FCE56900B3D7FF /* Release */,
+                                1447AEC118FCE56900B3D7FF /* Production */,
+                        );
+                        defaultConfigurationIsVisible = 0;
+                        defaultConfigurationName = Production;
+                };
</ins><span class="cx">                 5D247B5C14689B8600E78B76 /* Build configuration list for PBXProject &quot;WTF&quot; */ = {
</span><span class="cx">                         isa = XCConfigurationList;
</span><span class="cx">                         buildConfigurations = (
</span></span></pre></div>
<a id="trunkSourceWTFwtfmbmalloccpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WTF/wtf/mbmalloc.cpp (0 => 167355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/mbmalloc.cpp                                (rev 0)
+++ trunk/Source/WTF/wtf/mbmalloc.cpp        2014-04-16 17:48:56 UTC (rev 167355)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;FastMalloc.h&quot;
+
+#define EXPORT __attribute__((visibility(&quot;default&quot;)))
+
+extern &quot;C&quot; {
+
+EXPORT void* mbmalloc(size_t);
+EXPORT void mbfree(void*, size_t);
+EXPORT void* mbrealloc(void*, size_t, size_t);
+EXPORT void mbscavenge();
+    
+void* mbmalloc(size_t size)
+{
+    return WTF::fastMalloc(size);
+}
+
+void mbfree(void* p, size_t)
+{
+    return WTF::fastFree(p);
+}
+
+void* mbrealloc(void* p, size_t, size_t size)
+{
+    return WTF::fastRealloc(p, size);
+}
+
+void mbscavenge()
+{
+    WTF::releaseFastMallocFreeMemory();
+}
+    
+} // extern &quot;C&quot;
</ins></span></pre>
</div>
</div>

</body>
</html>