O'Reilly logo

iOS and macOS™ Performance Tuning: Cocoa®, Cocoa Touch®, Objective-C®, and Swift™ by Marcel Weiher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. Memory: Measurement and Tools

Memory has many different facets, with no one being primary. Even the seemingly simple question “How much memory is my program using?” does not have a single obviously correct answer. There is the amount of memory your program has obtained from the system via malloc and the amount the process (including malloc) has obtained from the operating system. Both of these are really address space, not memory, so there is the question of how much of that address space is backed by real memory. In addition, you have mapped files and lots of address space and memory that is shared between processes, mostly by the system.

Furthermore, the operating system is trying its best to optimize memory usage given the current set of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required