To answer the question, the use of profiling memory is especially important for iOS applications, since the iPhone and iPad have much less RAM than the Mac. The iPhone 4 has 512 MB of RAM, but earlier versions had 256 or 128 MB. The factor in RAM used by the OS and multitasking, and your application does not have a lot of RAM, so it is important to know how much memory your application uses.
Profiling performance is what you usually do when your application is slow. Profile it to find slow points in your code so you can run code faster. If your application works fine, you donโt have to work through performance very often.
To answer how, use the Allocations tool to measure memory usage. The Live Bytes column in the All Distributions category indicates the amount of memory that your application uses. The Allocations analytic analysis tool measures memory growth in your application. Use the menu on the left side of the transition bar to perform heap analysis.
The Time Profiler tool profiles your application for performance. The hard part of using the Time Profiler tool is interpreting the results. The Time Profiler tool is not going to tell you that your application spends 75% of its time in function X. You need to dig through the data to find slow points in your code.
As for acceptable memory usage, it depends on the devices you want to support, and on the application. An application like Xcode using 100 MB of RAM would be fine, but an application like TextEdit using 100 MB for a single page document would be a problem. 5 MB should not be a problem for an iOS application.
Mark Szymczyk Jul 11 '11 at 18:48 2011-07-11 18:48
source share