Changeset 180954 in webkit
- Timestamp:
- Mar 3, 2015 1:58:02 PM (9 years ago)
- Location:
- trunk/Source/bmalloc
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/bmalloc/ChangeLog
r180953 r180954 1 2015-03-03 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 but disabled on iOS until I can debug why the iOS PLT crashes. 9 10 * bmalloc/VMHeap.cpp: 11 (bmalloc::VMHeap::grow): 12 * bmalloc/VMHeap.h: 13 * bmalloc/Zone.cpp: 14 (bmalloc::Zone::size): 15 (bmalloc::Zone::Zone): 16 * bmalloc/Zone.h: 17 1 18 2015-03-03 Geoffrey Garen <ggaren@apple.com> 2 19 -
trunk/Source/bmalloc/bmalloc/VMHeap.cpp
r180797 r180954 41 41 { 42 42 SuperChunk* superChunk = SuperChunk::create(); 43 #if B PLATFORM(DARWIN)43 #if BOS(DARWIN) && !BPLATFORM(IOS) 44 44 m_zone.addSuperChunk(superChunk); 45 45 #endif -
trunk/Source/bmalloc/bmalloc/VMHeap.h
r180797 r180954 36 36 #include "SmallChunk.h" 37 37 #include "Vector.h" 38 #if B PLATFORM(DARWIN)38 #if BOS(DARWIN) && !BPLATFORM(IOS) 39 39 #include "Zone.h" 40 40 #endif … … 67 67 Vector<MediumPage*> m_mediumPages; 68 68 SegregatedFreeList m_largeObjects; 69 #if B PLATFORM(DARWIN)69 #if BOS(DARWIN) && !BPLATFORM(IOS) 70 70 Zone m_zone; 71 71 #endif -
trunk/Source/bmalloc/bmalloc/Zone.cpp
r180604 r180954 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
r180604 r180954 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.