Title: [117519] trunk/Source/_javascript_Core
Revision
117519
Author
[email protected]
Date
2012-05-17 17:55:43 -0700 (Thu, 17 May 2012)

Log Message

Not reviewed.

Rolled out r117495 because it caused som out of memory crashes.

* heap/Heap.cpp:
(JSC::Heap::collect):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (117518 => 117519)


--- trunk/Source/_javascript_Core/ChangeLog	2012-05-18 00:50:30 UTC (rev 117518)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-05-18 00:55:43 UTC (rev 117519)
@@ -1,5 +1,14 @@
 2012-05-17  Geoffrey Garen  <[email protected]>
 
+        Not reviewed.
+
+        Rolled out r117495 because it caused som out of memory crashes.
+
+        * heap/Heap.cpp:
+        (JSC::Heap::collect):
+
+2012-05-17  Geoffrey Garen  <[email protected]>
+
         Refactored the Heap to move more MarkedSpace logic into MarkedSpace
         https://bugs.webkit.org/show_bug.cgi?id=86790
 

Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (117518 => 117519)


--- trunk/Source/_javascript_Core/heap/Heap.cpp	2012-05-18 00:50:30 UTC (rev 117518)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp	2012-05-18 00:55:43 UTC (rev 117519)
@@ -706,14 +706,15 @@
         m_bytesAbandoned = 0;
     }
 
-    // To avoid pathological GC churn in large / growing heaps, we set the
-    // new allocation limit based on the current heap size. Note: This
-    // number only governs "emergency" GC caused by rapid allocation,
-    // so it's OK to be liberal here.
+    // To avoid pathological GC churn in large heaps, we set the new allocation 
+    // limit to be the current size of the heap. This heuristic 
+    // is a bit arbitrary. Using the current size of the heap after this 
+    // collection gives us a 2X multiplier, which is a 1:1 (heap size :
+    // new bytes allocated) proportion, and seems to work well in benchmarks.
     size_t newSize = size();
     if (fullGC) {
         m_sizeAfterLastCollect = newSize;
-        m_bytesAllocatedLimit = max(2 * newSize, m_minBytesPerCycle);
+        m_bytesAllocatedLimit = max(newSize, m_minBytesPerCycle);
     }
     m_bytesAllocated = 0;
     double lastGCEndTime = WTF::currentTime();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to