Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VM Tracker Swapped memory

What is the "Swapped Size" in Xcode VM Tracker instrumentation tool on iOS? Does iOS 10 have swap?

VM Tracker iOS Screenshot

like image 689
Mateusz Krzaczek Avatar asked May 18 '26 22:05

Mateusz Krzaczek


1 Answers

It refers to the compressed memory, which is how iOS deals with unused pages. Instead of totally moving unused pages from RAM to drive, it compresses them and keeps compressed bytes in RAM. However, one important thing to note is that your app's total memory footprint will still be computed using the UNCOMPRESSED size. The moment you access the page again, it will get decompressed again in RAM. So the "swap size" in all the tools actually refers to the UNCOMPRESSED size of unused pages. On iOS, ultimately your memory footprint = dirty + swap size.

Source: https://developer.apple.com/videos/play/wwdc2018/416/?time=125

like image 159
Steve A Avatar answered May 20 '26 10:05

Steve A