Changeset 280600 in webkit
- Timestamp:
- Aug 3, 2021, 10:05:15 AM (5 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
wtf/Lock.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r280559 r280600 1 2021-08-03 Youenn Fablet <youenn@apple.com> 2 3 RealtimeMediaSource::audioSamplesAvailable is calling malloc as part of locking in audio thread 4 https://bugs.webkit.org/show_bug.cgi?id=228688 5 6 Reviewed by Eric Carlson. 7 8 Allow allocations in lockSlow since allocations might happen in rare case and not for each lockSlow call. 9 10 * wtf/Lock.cpp: 11 (WTF::Lock::lockSlow): 12 (WTF::Lock::unlockSlow): 13 (WTF::Lock::unlockFairlySlow): 14 1 15 2021-08-02 Ryosuke Niwa <rniwa@webkit.org> 2 16 -
trunk/Source/WTF/wtf/Lock.cpp
r278257 r280600 44 44 if (profileLockContention) 45 45 STACK_SHOT_PROFILE(4, 2, 5); 46 47 // Heap allocations are forbidden on certain threads (e.g. audio rendering thread) for performance reasons so we need to 48 // explicitly allow the following allocation(s). In some rare cases, the lockSlow() algorithm may cause allocations. 49 DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; 50 46 51 DefaultLockAlgorithm::lockSlow(m_byte); 47 52 } … … 49 54 void Lock::unlockSlow() 50 55 { 51 // Heap allocations are forbidden on thecertain threads (e.g. audio rendering thread) for performance reasons so we need to52 // explicitly allow the following allocation(s). In some rare cases, the unlockSlow() algorith may cause allocations.56 // Heap allocations are forbidden on certain threads (e.g. audio rendering thread) for performance reasons so we need to 57 // explicitly allow the following allocation(s). In some rare cases, the unlockSlow() algorithm may cause allocations. 53 58 DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; 54 59 … … 58 63 void Lock::unlockFairlySlow() 59 64 { 60 // Heap allocations are forbidden on thecertain threads (e.g. audio rendering thread) for performance reasons so we need to61 // explicitly allow the following allocation(s). In some rare cases, the unlockSlow() algorith may cause allocations.65 // Heap allocations are forbidden on certain threads (e.g. audio rendering thread) for performance reasons so we need to 66 // explicitly allow the following allocation(s). In some rare cases, the unlockSlow() algorithm may cause allocations. 62 67 DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; 63 68
Note:
See TracChangeset
for help on using the changeset viewer.