Changeset 173524 in webkit
- Timestamp:
- Sep 11, 2014, 12:05:38 PM (12 years ago)
- Location:
- trunk/Source/bmalloc
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
bmalloc/Allocator.cpp (modified) (1 diff)
-
bmalloc/MediumAllocator.h (modified) (2 diffs)
-
bmalloc/SmallAllocator.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/bmalloc/ChangeLog
r173346 r173524 1 2014-09-11 Geoffrey Garen <ggaren@apple.com> 2 3 bmalloc: eager scavenge leaves behind a bogus allocator 4 https://bugs.webkit.org/show_bug.cgi?id=136743 5 6 Reviewed by Sam Weinig. 7 8 Be sure to clear the allocator after logging it in the eager scavenge 9 case, so that we don't later try to allocate out of the lines that we 10 have thrown away. 11 12 We didn't need to do this previously because scavenge would only happen 13 at thread exit time, after which no further allocation from the per-thread 14 cache would take place. 15 16 * bmalloc/Allocator.cpp: 17 (bmalloc::Allocator::scavenge): 18 * bmalloc/MediumAllocator.h: 19 (bmalloc::MediumAllocator::clear): 20 * bmalloc/SmallAllocator.h: 21 (bmalloc::SmallAllocator::clear): 22 1 23 2014-09-05 Geoffrey Garen <ggaren@apple.com> 2 24 -
trunk/Source/bmalloc/bmalloc/Allocator.cpp
r167570 r173524 57 57 void Allocator::scavenge() 58 58 { 59 for (auto& allocator : m_smallAllocators) 59 for (auto& allocator : m_smallAllocators) { 60 60 log(allocator); 61 allocator.clear(); 62 } 61 63 processSmallAllocatorLog(); 62 64 63 65 log(m_mediumAllocator); 66 m_mediumAllocator.clear(); 64 67 processMediumAllocatorLog(); 65 68 } -
trunk/Source/bmalloc/bmalloc/MediumAllocator.h
r167546 r173524 46 46 47 47 unsigned char derefCount(); 48 48 49 void refill(MediumLine*); 50 void clear(); 49 51 50 52 private: … … 102 104 } 103 105 106 inline void MediumAllocator::clear() 107 { 108 m_end = nullptr; 109 m_remaining = 0; 110 m_objectCount = 0; 111 } 112 104 113 } // namespace bmalloc 105 114 -
trunk/Source/bmalloc/bmalloc/SmallAllocator.h
r167546 r173524 48 48 unsigned short objectCount(); 49 49 unsigned char derefCount(); 50 50 51 void refill(SmallLine*); 52 void clear(); 51 53 52 54 private: … … 108 110 } 109 111 112 inline void SmallAllocator::clear() 113 { 114 m_ptr = nullptr; 115 m_remaining = 0; 116 } 117 110 118 } // namespace bmalloc 111 119
Note:
See TracChangeset
for help on using the changeset viewer.