Brian Brian - 7 months ago 69
iOS Question

instruments with iOS: Why does Memory Monitor disagree with Allocations?

As can been seen in this screen shot from instruments, Allocations thinks my application (Ongo) is only using 7.55 MBs of memory, while Memory Monitor says 53.30. Further more the free system memory has little to no correlation to the amount of memory that the app is using. Does anyone know why there is such a big disagreement between these two tools? Additionally is it possible to find the source of the low system memory or how to keep it from running out so quickly? My app doesn't appear to be leaking memory but somehow it's exhausting the system resources.


Instruments Y U Lie?


For those who sees this post after the year 2012:

The memory really loaded into device's physical memory is the Resident Memory in VM Tracker Instrument.

Allocation Instrument only marks the memory created by malloc/[NSObject alloc] and some framework buffer, for example, decompressed image bitmap is not included in Allocation Instrument but it always takes most of your memory.

Please Watch WWDC 2012 Session 242 iOS App Performance: Memory to get the information from Apple.