Changeset 211241 in webkit
- Timestamp:
- Jan 26, 2017 4:56:44 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r211240 r211241 1 2017-01-26 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: iOS: Memory timeline shows impossible values for Page size (underflowed) 4 https://bugs.webkit.org/show_bug.cgi?id=167468 5 <rdar://problem/30099051> 6 7 Reviewed by Andreas Kling. 8 9 * page/cocoa/ResourceUsageThreadCocoa.mm: 10 (WebCore::vmPageSize): 11 This value matches the sysctl value we were attempting to access, and is 12 the most appropriate when dealing with mach APIs, as we are using here. 13 1 14 2017-01-26 Jer Noble <jer.noble@apple.com> 2 15 -
trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm
r207896 r211241 35 35 #include <mach/vm_statistics.h> 36 36 #include <runtime/VM.h> 37 #include <sys/sysctl.h>38 37 39 38 namespace WebCore { … … 41 40 static size_t vmPageSize() 42 41 { 43 static size_t pageSize; 44 static std::once_flag onceFlag; 45 std::call_once(onceFlag, [&] { 46 size_t outputSize = sizeof(pageSize); 47 int status = sysctlbyname("vm.pagesize", &pageSize, &outputSize, nullptr, 0); 48 ASSERT_UNUSED(status, status != -1); 49 ASSERT(pageSize); 50 }); 51 return pageSize; 42 #if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 43 return vm_kernel_page_size; 44 #else 45 static size_t cached = sysconf(_SC_PAGESIZE); 46 return cached; 47 #endif 52 48 } 53 49
Note: See TracChangeset
for help on using the changeset viewer.