Calculating physical footprint vs SM_PRIVATE regions

Questions and Answers about all things *OS (macOS, iOS, tvOS, watchOS)

Calculating physical footprint vs SM_PRIVATE regions

Postby elist » Wed Jun 27, 2018 4:17 pm

Hi J!

I am working on a system resources monitor tool for iOS, and had trouble understanding something APPL are doing. Hoped you'd have an insight on that...
I use mach_vm_region in a simple application and sum up the region's memory based on the sm_mode.
The SM_PRIVATE regions sum up to roughly 550MB.
The thing is, I would expect it to be much smaller, since the app is doing virtually no allocations...
I don't believe these regions are from shared caches, since it would probably not be in SM_PRIVATE but in SM_COW or SM_SHARED.

So I looked into APPL's implementation of Instruments, and found that the instruments service (DTSysmonTap or something) is serving a value attributed "physFootprint", which is what Instruments presents in the "Memory" column of the activity monitor - this value is a few MBs and makes much more sense to me.

Problem is, I don't understand how this value is calculated... I will try to dig into the daemon itself later, but was hoping to get a hint from someone more familiar with iOS's vm model...

I was guessing that the SM_PRIVATE includes the pools for objc object allocator, but could not verify this, and I also have no idea how to get the same value from inside the process.

So.. the question is actually - any idea what is the term "Physical Footprint"? Is it a common term that I can learn about somewhere?

Thanks in advance!
Posts: 15
Joined: Wed Mar 16, 2016 9:05 am

Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 1 guest