Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode Instruments Allocations: Look at Live Bytes or Overall Bytes?

I am getting some memory warning in my iOS app so I am running Instruments to see the allocations. Should I look at the * All Allocations * Live Bytes or Overall Bytes?

Someone said the iOS can close my app if I use for 22MB, is that from the Live or Overall bytes section?

enter image description here

like image 684
Nic Hubbard Avatar asked Sep 27 '11 19:09

Nic Hubbard


1 Answers

Live Bytes is the current usage and is what you are interested in, overall bytes includes all released allocation. The other thing is to look at the graph and look for peaks. As an example I saw a huge peak of about 27MB in an app I was working on, knowing that I was able to reduce peak memory usage to 8MB.

Also watch over time as you exercise your app, it is possible to have substantial memory growth over time that is not leaked, just not not used anymore.

For a description of the memory columns see Explanation of Live Bytes & Overall Bytes.

like image 165
zaph Avatar answered Nov 04 '22 06:11

zaph