Title: [184019] trunk/Source/_javascript_Core
Revision
184019
Author
[email protected]
Date
2015-05-08 15:54:24 -0700 (Fri, 08 May 2015)

Log Message

Creating a large MarkedBlock sometimes results in more than one cell in the block
https://bugs.webkit.org/show_bug.cgi?id=144815

Reviewed by Mark Lam.

Large MarkedBlocks should have one and only one cell.  Changed the calculation of
m_endAtom for large blocks to use the location of the first cell + 1.  This
assures that large blocks only have one cell.

* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::MarkedBlock):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (184018 => 184019)


--- trunk/Source/_javascript_Core/ChangeLog	2015-05-08 22:11:30 UTC (rev 184018)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-05-08 22:54:24 UTC (rev 184019)
@@ -1,3 +1,17 @@
+2015-05-08  Michael Saboff  <[email protected]>
+
+        Creating a large MarkedBlock sometimes results in more than one cell in the block
+        https://bugs.webkit.org/show_bug.cgi?id=144815
+
+        Reviewed by Mark Lam.
+
+        Large MarkedBlocks should have one and only one cell.  Changed the calculation of
+        m_endAtom for large blocks to use the location of the first cell + 1.  This
+        assures that large blocks only have one cell.
+
+        * heap/MarkedBlock.cpp:
+        (JSC::MarkedBlock::MarkedBlock):
+
 2015-05-08  Oliver Hunt  <[email protected]>
 
         MapDataImpl::add() shouldn't do the same hash lookup twice.

Modified: trunk/Source/_javascript_Core/heap/MarkedBlock.cpp (184018 => 184019)


--- trunk/Source/_javascript_Core/heap/MarkedBlock.cpp	2015-05-08 22:11:30 UTC (rev 184018)
+++ trunk/Source/_javascript_Core/heap/MarkedBlock.cpp	2015-05-08 22:54:24 UTC (rev 184019)
@@ -47,7 +47,7 @@
 MarkedBlock::MarkedBlock(MarkedAllocator* allocator, size_t capacity, size_t cellSize, bool needsDestruction)
     : DoublyLinkedListNode<MarkedBlock>()
     , m_atomsPerCell((cellSize + atomSize - 1) / atomSize)
-    , m_endAtom((allocator->cellSize() ? atomsPerBlock : capacity / atomSize) - m_atomsPerCell + 1)
+    , m_endAtom((allocator->cellSize() ? atomsPerBlock - m_atomsPerCell : firstAtom()) + 1)
     , m_capacity(capacity)
     , m_needsDestruction(needsDestruction)
     , m_allocator(allocator)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to