Use mach_vm_region(...,VM_REGION_TOP_INFO,...) instead of mincore |
||
Issue descriptionThe implementation of mincore iterates through every virtual page in the region, where VM_REGION_TOP_INFO just looks at aggregate stats for the region. See xnu-3789.1.32/bsd/kern/kern_mman.c:1015 and xnu-3789.1.32/osfmk/vm/vm_map.c:12152.
,
Apr 28 2017
If we know that discardable regions only call CountResidentBytes with whole virtual regions then I am happy with replacing the CountResidentBytes to use mach_vm_region, with a comment saying it only works for whole regions on Mac. If there is a chance that discardable could use segments of the allocated regions then we could just add a new function to VmRegionResidentBytes() to wrap mach_vm_region. I think the intention here is to be able to count the resident size of shared memory regions in a faster way. I am not sure if we have a similar api on Linux/Android that we could use.
,
Jan 10
Archiving P3s older than 1 year with no owner or component. |
||
►
Sign in to add a comment |
||
Comment 1 by primiano@chromium.org
, Apr 28 2017