Summary: iOS: Memory timeline shows impossible values for Page size (underflowed) Steps to Reproduce: 1. Inspect iOS 10 device 2. Enable Memory Timeline 3. Start and stop timeline recording => Page memory values are impossible Notes: - vmPageSize() is returning 0 on iOS (sandbox violation prevents accessing sysctlbyname)
<rdar://problem/30099051>
This developer forum post seems to offer the most accurate information: https://forums.developer.apple.com/thread/47532 Namely: These should all match: - getpagesize - sysconf(_SC_PAGESIZE) - vm_page_size As: • 16 KiB on 64-bit ARM platforms • 4 KiB on everything else However, "various low-level Mach APIs (which we are using here) continue to work in terms of 4 KiB pages." You can get that value using vm_kernel_page_size. --- So this ends up matching bmalloc's vmPageSizePhysical(): > inline size_t vmPageSizePhysical() > { > #if (BPLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) > return vm_kernel_page_size; > #else > static size_t cached; > if (!cached) > cached = sysconf(_SC_PAGESIZE); > return cached; > #endif > }
Created attachment 299862 [details] [PATCH] Proposed Fix
Comment on attachment 299862 [details] [PATCH] Proposed Fix r=me!
Comment on attachment 299862 [details] [PATCH] Proposed Fix Clearing flags on attachment: 299862 Committed r211241: <http://trac.webkit.org/changeset/211241>
All reviewed patches have been landed. Closing bug.