Ignore:
Timestamp:
Jun 21, 2022, 4:57:05 PM (3 years ago)
Author:
[email protected]
Message:

Unreviewed, revert "The extraMemorySize() get wrong when transferring ArrayBuffer from Worker VM"
https://bugs.webkit.org/show_bug.cgi?id=241826
rdar://95384643

This reverts commit 71960bed2a3ee0917367bc4144911a9e8168deea.

m_extraMemorySize must be monotonically increasing during GC cycles until
full-collection happens. And after the full-collection, it is adjusted.
We already adjusted it in sweep of m_arrayBuffer, so, we should not reduce
that number. This is used for GC invocation scheduling. So, if we would like to
have a number which more precisely reflecting the current status,
then we should have yet another one. And we can still use extraMemorySize
since it will be adjusted after the full-collection. So we can consider
that transferred array-buffer is collected at the full-collection.

Canonical link: https://commits.webkit.org/251708@main

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r295624 r295703  
    660660}
    661661
    662 void Heap::reduceArrayBufferSize(size_t bytes)
    663 {
    664     m_arrayBuffers.reduceSize(bytes);
    665 }
    666 
    667662template<typename CellType, typename CellSet>
    668663void Heap::finalizeMarkedUnconditionalFinalizers(CellSet& cellSet)
Note: See TracChangeset for help on using the changeset viewer.