Changeset 130212 in webkit for trunk/Source/JavaScriptCore/heap
- Timestamp:
- Oct 2, 2012, 2:24:19 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/heap
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/BlockAllocator.cpp
r124250 r130212 139 139 DeadBlock::destroy(block).deallocate(); 140 140 } 141 142 // Sleep until there is actually work to do rather than waking up every second to check. 143 MutexLocker locker(m_freeBlockConditionLock); 144 m_freeBlockLock.Lock(); 145 while (!m_numberOfFreeBlocks && !m_blockFreeingThreadShouldQuit) { 146 m_freeBlockLock.Unlock(); 147 m_freeBlockCondition.wait(m_freeBlockConditionLock); 148 m_freeBlockLock.Lock(); 149 } 150 m_freeBlockLock.Unlock(); 141 151 } 142 152 } -
trunk/Source/JavaScriptCore/heap/BlockAllocator.h
r124250 r130212 105 105 inline void BlockAllocator::deallocate(PageAllocationAligned allocation) 106 106 { 107 SpinLockHolder locker(&m_freeBlockLock); 108 m_freeBlocks.push(DeadBlock::create(allocation)); 109 m_numberOfFreeBlocks++; 107 size_t numberOfFreeBlocks; 108 { 109 SpinLockHolder locker(&m_freeBlockLock); 110 m_freeBlocks.push(DeadBlock::create(allocation)); 111 numberOfFreeBlocks = m_numberOfFreeBlocks++; 112 } 113 114 if (!numberOfFreeBlocks) { 115 MutexLocker mutexLocker(m_freeBlockConditionLock); 116 m_freeBlockCondition.signal(); 117 } 110 118 } 111 119
Note:
See TracChangeset
for help on using the changeset viewer.