en determining how much memory is being used by an app, the system must
account for shared pages. Apps that access the same service or library will be
sharing memory pages. For example, Google Play Services and a game app may be
sharing a location service. This makes it difficult to determine how much
memory belongs to the service at large versus each application.

![Pages shared by two apps](/static/images/games/pages-shared-apps.svg)

**Figure 6.** Pages shared by two apps (middle)

To determine the memory footprint for an application, any of the following
metrics may be used:

  * Resident Set Size (RSS): The number of shared and non-shared pages used by the app 
  * Proportional Set Size (PSS): The number of non-shared pages used by the app and an even distribution of the shared pages (for example, if three processes are sharing 3MB, each process gets 1MB in PSS) 
  * Unique Set Size (USS): The number of non-shared pages used by the app (shared pages are not included) 

PSS is useful for the operating system when it wants to know how much memory
is used by all processes since pages don’t get counted multiple times. PSS
takes a long time to calculate because the system needs to determine which
pages are shared and by how many processes. RSS doesn't distinguish between
shared and non-shared pages (making it faster to calculate) and is better for
tracking changes in memory allocation.

##  Additional resources

  * [ Overview of memory management ](/topic/performance/memory-overview)
  * [ Processes and Application Lifecycle ](/guide/components/activities/process-lifecycle)
  * [ Understanding Android memory usage - Google I/O presentation ](https://www.youtube.com/watch?v=w7K0jio8afM)
  * [ Android Memory and Games - Google I/O presentation ](https://www.youtube.com/watch?v=Do7oYWwOXTk&t=314s)
  * [ Android Low Memory Killer Daemon ](https://android.googlesource.com/platform/system/memory/lmkd/+/master/README.md)

##  Recommended for you

  * Note: link text is displayed when JavaScript is off 
  * [ App startup time ](/topic/performance/vitals/launch-time)

Content and code samples on this page are subject to the licenses described in
the [ Content License ](/license) . Java and OpenJDK are trademarks or
registered trademarks of Oracle and/or its affiliates.

Last updated 2023-08-23 UTC.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing
the information I need" },{ "type": "thumb-down", "id":
"tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{
"type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type":
"thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{
"type": "thumb-down", "id": "otherDown", "label":"Other" }]  [{ "type":
"thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type":
"thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type":
"thumb-up", "id": "otherUp", "label":"Other" }]

  * [ ![X](/_static/android/images/logo-x.svg) X ](//x.com/AndroidDev)

Follow @AndroidDev on X

  * [ ![YouTube](//www.gstatic.com/images/icons/material/product/2x/youtube_48dp.png) YouTube ](//www.youtube.com/user/androiddevelopers)

Check out Android Developers on YouTube

  * [ ![LinkedIn](/_static/android/images/logo-linkedin.svg) LinkedIn ](//www.linkedin.com/showcase/androiddev)

Connect with the Android Developers community on LinkedIn

  * ###  More Android 

    * [ Android ](//www.android.com)
    * [ Android for Enterprise ](//www.android.com/enterprise/)
    * [ Security ](//www.android.com/security-center/)
    * [ Source ](//source.android.com)
    * [ News ](/news)
    * [ Blog ](//android-developers.googleblog.com/)
    * [ Podcasts ](/podcasts)
  * ###  Discover 

    * [ Gaming ](/games)
    * [ Machine Learning ](/ml)
    * [ Privacy ](/privacy)
    * [ 5G ](/training/connectivity/5g)
  * ###  Android Devices 

    * [ Large screens ](/large-screens)
    * [ Wear OS ](/wear)
    * [ ChromeOS de