title: How Android OS calculates memory usage of an application?
body: <p>I mean memory usage of an application displayed on Settings > App > Running. 
  Why is that number far different than Heap size of an app on DDMS? For example, in the picture OS says my app use 151 MB (include Google PLay Service) but DDMS says only 40MB of memory is used.</p>
  
  <p>And 2nd question is: Google Analytics Service used 27MB, this is for my app only or for all apps use Google Analytics Service? If it's for my app only it's an expensive cost!</p>
  
  <p><img src="https://i.stack.imgur.com/358Gr.png" alt="enter image description here"></p>