Title: [89637] trunk/Source/_javascript_Core
Revision
89637
Author
[email protected]
Date
2011-06-23 17:16:47 -0700 (Thu, 23 Jun 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=63298
Replace Malloc with FastMalloc to match the rest of wtf.

Reviewed by Darin Adler.

* wtf/BlockStack.h:
(WTF::::~BlockStack):
(WTF::::grow):
(WTF::::shrink):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (89636 => 89637)


--- trunk/Source/_javascript_Core/ChangeLog	2011-06-24 00:15:26 UTC (rev 89636)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-06-24 00:16:47 UTC (rev 89637)
@@ -1,3 +1,15 @@
+2011-06-23  Stephanie Lewis  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=63298
+        Replace Malloc with FastMalloc to match the rest of wtf.
+
+        * wtf/BlockStack.h:
+        (WTF::::~BlockStack):
+        (WTF::::grow):
+        (WTF::::shrink):
+
 2011-06-23  Oliver Hunt  <[email protected]>
 
         Reviewed by Gavin Barraclough.

Modified: trunk/Source/_javascript_Core/wtf/BlockStack.h (89636 => 89637)


--- trunk/Source/_javascript_Core/wtf/BlockStack.h	2011-06-24 00:15:26 UTC (rev 89636)
+++ trunk/Source/_javascript_Core/wtf/BlockStack.h	2011-06-24 00:16:47 UTC (rev 89637)
@@ -27,6 +27,7 @@
 #define BlockStack_h
 
 #include <wtf/Assertions.h>
+#include <wtf/FastMalloc.h>
 #include <wtf/Vector.h>
 
 namespace WTF {
@@ -57,9 +58,9 @@
 template <typename T> BlockStack<T>::~BlockStack()
 {
     if (m_spareBlock)
-        free(m_spareBlock);
+        fastFree(m_spareBlock);
     for (size_t i = 0; i < m_blocks.size(); ++i)
-        free(m_blocks[i]);
+        fastFree(m_blocks[i]);
 }
 
 template <typename T> inline const Vector<T*>& BlockStack<T>::blocks()
@@ -69,7 +70,7 @@
 
 template <typename T> T* BlockStack<T>::grow()
 {
-    T* block = m_spareBlock ? m_spareBlock : static_cast<T*>(malloc(blockSize));
+    T* block = m_spareBlock ? m_spareBlock : static_cast<T*>(fastMalloc(blockSize));
     m_spareBlock = 0;
 
     m_blocks.append(block);
@@ -83,7 +84,7 @@
     m_blocks.removeLast();
 
     while (m_blocks.last() + blockLength != newEnd) {
-        free(m_blocks.last());
+        fastFree(m_blocks.last());
         m_blocks.removeLast();
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to