Ignore:
Timestamp:
Sep 30, 2011, 3:23:33 PM (14 years ago)
Author:
[email protected]
Message:

2011-09-30 Oliver Hunt <[email protected]>

Need a sensible GGC policy

Reviewed by Geoff Garen.

This replaces the existing random collection policy
with a deterministic policy based on nursery size.

  • heap/AllocationSpace.cpp: (JSC::AllocationSpace::allocateSlowCase):
  • heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::markRoots): (JSC::Heap::collect):
  • heap/Heap.h:
  • heap/MarkedSpace.cpp: (JSC::MarkedSpace::MarkedSpace): (JSC::MarkedSpace::resetAllocator):
  • heap/MarkedSpace.h: (JSC::MarkedSpace::nurseryWaterMark): (JSC::MarkedSpace::allocate):
File:
1 edited

Legend:

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

    r96372 r96432  
    5656    AllocationEffort allocationEffort;
    5757   
    58     if (m_markedSpace.waterMark() < m_markedSpace.highWaterMark() || !m_heap->m_isSafeToCollect)
     58    if ((
     59#if ENABLE(GGC)
     60         m_markedSpace.nurseryWaterMark() < m_heap->m_minBytesPerCycle
     61#else
     62         m_markedSpace.waterMark() < m_markedSpace.highWaterMark()
     63#endif
     64         ) || !m_heap->m_isSafeToCollect)
    5965        allocationEffort = AllocationMustSucceed;
    6066    else
Note: See TracChangeset for help on using the changeset viewer.