Changeset 204917 in webkit
- Timestamp:
- Aug 24, 2016 12:23:47 PM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r204916 r204917 1 2016-08-24 Andreas Kling <akling@apple.com> 2 3 Add WTF::isFastMallocEnabled(). 4 <https://webkit.org/b/160534> 5 6 Reviewed by Joseph Pecoraro. 7 8 * wtf/FastMalloc.cpp: 9 (WTF::isFastMallocEnabled): 10 * wtf/FastMalloc.h: 11 1 12 2016-08-23 Anders Carlsson <andersca@apple.com> 2 13 -
trunk/Source/WTF/wtf/FastMalloc.cpp
r204912 r204917 82 82 namespace WTF { 83 83 84 bool isFastMallocEnabled() 85 { 86 return false; 87 } 88 84 89 size_t fastMallocGoodSize(size_t bytes) 85 90 { … … 188 193 189 194 namespace WTF { 195 196 bool isFastMallocEnabled() 197 { 198 return bmalloc::api::isEnabled(); 199 } 190 200 191 201 void* fastMalloc(size_t size) -
trunk/Source/WTF/wtf/FastMalloc.h
r204912 r204917 38 38 mutable void* m_data; 39 39 }; 40 41 WTF_EXPORT_PRIVATE bool isFastMallocEnabled(); 40 42 41 43 // These functions call CRASH() if an allocation fails. … … 100 102 } // namespace WTF 101 103 104 using WTF::isFastMallocEnabled; 102 105 using WTF::fastCalloc; 103 106 using WTF::fastFree; -
trunk/Source/WebCore/ChangeLog
r204912 r204917 1 2016-08-24 Andreas Kling <akling@apple.com> 2 3 Leaks bot hits an assertion in ResourceUsageThread::platformThreadBody 4 <https://webkit.org/b/160534> 5 6 Reviewed by Joseph Pecoraro. 7 8 Use the correct malloc bucket when bmalloc is disabled (which is the case on leaks bots.) 9 10 * page/cocoa/ResourceUsageThreadCocoa.mm: 11 (WebCore::ResourceUsageThread::platformThreadBody): 12 1 13 2016-08-24 Filip Pizlo <fpizlo@apple.com> 2 14 -
trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm
r202394 r204917 228 228 data.categories[MemoryCategory::GCOwned].externalSize = currentGCOwnedExternal; 229 229 230 // Subtract known subchunks from the bmalloc bucket. 231 // FIXME: Handle running with bmalloc disabled. 232 size_t currentGCOwnedGenerallyInBmalloc = currentGCOwnedExtra - currentGCOwnedExternal; 233 ASSERT(currentGCOwnedGenerallyInBmalloc < data.categories[MemoryCategory::bmalloc].dirtySize); 234 data.categories[MemoryCategory::bmalloc].dirtySize -= currentGCHeapCapacity + currentGCOwnedGenerallyInBmalloc; 230 // Subtract known subchunks from the appropriate malloc bucket. 231 size_t currentGCOwnedGenerallyInMalloc = currentGCOwnedExtra - currentGCOwnedExternal; 232 if (isFastMallocEnabled()) { 233 RELEASE_ASSERT(currentGCOwnedGenerallyInMalloc < data.categories[MemoryCategory::bmalloc].dirtySize); 234 data.categories[MemoryCategory::bmalloc].dirtySize -= currentGCHeapCapacity + currentGCOwnedGenerallyInMalloc; 235 } else { 236 RELEASE_ASSERT(currentGCOwnedGenerallyInMalloc < data.categories[MemoryCategory::LibcMalloc].dirtySize); 237 data.categories[MemoryCategory::LibcMalloc].dirtySize -= currentGCHeapCapacity + currentGCOwnedGenerallyInMalloc; 238 } 235 239 236 240 data.totalExternalSize = currentGCOwnedExternal; -
trunk/Source/bmalloc/ChangeLog
r204912 r204917 1 2016-08-24 Andreas Kling <akling@apple.com> 2 3 Add bmalloc::api::isEnabled(). 4 <https://webkit.org/b/160534> 5 6 Reviewed by Joseph Pecoraro. 7 8 * bmalloc/bmalloc.h: 9 (bmalloc::api::isEnabled): 10 1 11 2016-08-24 Filip Pizlo <fpizlo@apple.com> 2 12 -
trunk/Source/bmalloc/bmalloc/bmalloc.h
r204912 r204917 74 74 } 75 75 76 inline bool isEnabled() 77 { 78 std::unique_lock<StaticMutex> lock(PerProcess<Heap>::mutex()); 79 return PerProcess<Heap>::getFastCase()->environment().isBmallocEnabled(); 80 } 81 76 82 } // namespace api 77 83 } // namespace bmalloc
Note: See TracChangeset
for help on using the changeset viewer.