Changeset 180430 in webkit
- Timestamp:
- Feb 20, 2015 11:28:41 AM (9 years ago)
- Location:
- trunk/Source/bmalloc
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/bmalloc/ChangeLog
r180372 r180430 1 2015-02-20 Geoffrey Garen <ggaren@apple.com> 2 3 bmalloc should implement malloc introspection (to stop false-positive leaks when MallocStackLogging is off) 4 https://bugs.webkit.org/show_bug.cgi?id=141802 5 6 Reviewed by Andreas Kling. 7 8 Rolling back in with a fix for a crash seen while using GuardMalloc. 9 10 * bmalloc/VMHeap.cpp: 11 (bmalloc::VMHeap::grow): 12 * bmalloc/VMHeap.h: 13 * bmalloc/Zone.cpp: Re-land the old patch. 14 15 (bmalloc::Zone::size): Be sure to implement the size() function since 16 it's accessible indirectly via the malloc_zone_from_ptr public API -- 17 and GuardMalloc calls it all the time. 18 19 (bmalloc::Zone::Zone): 20 * bmalloc/Zone.h: Re-land the old patch. 21 1 22 2015-02-19 Commit Queue <commit-queue@webkit.org> 2 23 -
trunk/Source/bmalloc/bmalloc/VMHeap.cpp
r180372 r180430 41 41 { 42 42 SuperChunk* superChunk = SuperChunk::create(); 43 #if B PLATFORM(DARWIN)43 #if BOS(DARWIN) 44 44 m_zone.addSuperChunk(superChunk); 45 45 #endif -
trunk/Source/bmalloc/bmalloc/VMHeap.h
r180372 r180430 35 35 #include "SmallChunk.h" 36 36 #include "Vector.h" 37 #if B PLATFORM(DARWIN)37 #if BOS(DARWIN) 38 38 #include "Zone.h" 39 39 #endif … … 65 65 Vector<MediumPage*> m_mediumPages; 66 66 SegregatedFreeList m_largeRanges; 67 #if B PLATFORM(DARWIN)67 #if BOS(DARWIN) 68 68 Zone m_zone; 69 69 #endif -
trunk/Source/bmalloc/bmalloc/Zone.cpp
r180359 r180430 43 43 } 44 44 45 // Support malloc_zone_from_ptr, which calls size() on each registered zone. 46 size_t Zone::size(malloc_zone_t*, const void*) 47 { 48 // Our zone is not public API, so no pointer can belong to us. 49 return 0; 50 } 51 45 52 // This function runs inside the leaks process. 46 53 kern_return_t Zone::enumerator(task_t task, void* context, unsigned type_mask, vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t recorder) … … 64 71 Zone::Zone() 65 72 { 66 version = 4; 67 zone_name = "WebKit Malloc"; 68 introspect = &bmalloc::introspect; 73 malloc_zone_t::size = size; 74 malloc_zone_t::zone_name = "WebKit Malloc"; 75 malloc_zone_t::introspect = &bmalloc::introspect; 76 malloc_zone_t::version = 4; 69 77 malloc_zone_register(this); 70 78 } -
trunk/Source/bmalloc/bmalloc/Zone.h
r180359 r180430 39 39 static const size_t capacity = 2048; 40 40 41 static size_t size(malloc_zone_t*, const void*); 41 42 static kern_return_t enumerator(task_t, void* context, unsigned type_mask, vm_address_t, memory_reader_t, vm_range_recorder_t); 42 43
Note: See TracChangeset
for help on using the changeset viewer.