Changeset 155317 in webkit for trunk/Source/JavaScriptCore/heap/Heap.cpp
- Timestamp:
- Sep 8, 2013, 5:11:57 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/Heap.cpp
r155316 r155317 252 252 , m_bytesAllocated(0) 253 253 , m_bytesAbandoned(0) 254 , m_totalBytesVisited(0) 255 , m_totalBytesCopied(0) 254 256 , m_operationInProgress(NoOperation) 255 257 , m_blockAllocator() … … 592 594 #endif 593 595 596 m_totalBytesVisited = visitor.bytesVisited(); 597 m_totalBytesCopied = visitor.bytesCopied(); 598 #if ENABLE(PARALLEL_GC) 599 m_totalBytesVisited += m_sharedData.childBytesVisited(); 600 m_totalBytesCopied += m_sharedData.childBytesCopied(); 601 #endif 602 594 603 visitor.reset(); 595 604 #if ENABLE(PARALLEL_GC) … … 635 644 } 636 645 646 size_t Heap::sizeAfterCollect() 647 { 648 // The result here may not agree with the normal Heap::size(). 649 // This is due to the fact that we only count live copied bytes 650 // rather than all used (including dead) copied bytes, thus it's 651 // always the case that m_totalBytesCopied <= m_storageSpace.size(). 652 ASSERT(m_totalBytesCopied <= m_storageSpace.size()); 653 return m_totalBytesVisited + m_totalBytesCopied + extraSize(); 654 } 655 637 656 size_t Heap::protectedGlobalObjectCount() 638 657 { … … 799 818 } 800 819 801 size_t currentHeapSize = size ();820 size_t currentHeapSize = sizeAfterCollect(); 802 821 if (Options::gcMaxHeapSize() && currentHeapSize > Options::gcMaxHeapSize()) 803 822 HeapStatistics::exitWithFailure();
Note:
See TracChangeset
for help on using the changeset viewer.