Why is it that sometimes, closing an application on a phone decreases available RAM instead of increasing it?

234 views

Why is it that sometimes, closing an application on a phone decreases available RAM instead of increasing it?

In: 2

6 Answers

Anonymous 0 Comments

**The Reason:**
Every system is different, but often app data is stored in RAM even if it’s closed to enable faster reloading the next time you open it. (It’s faster because that data doesn’t have to be re-written to memory again the next time it’s needed – a process which takes time)

This means that by closing the app and switching to another one, you’ll often see usage go up because you’ve launched another app (your home screen is also an app, so just going to the home screen is the same) and it also had to show a bunch of animations along the way, which takes additional processing and system resources.

Whatever memory management system your device uses can then just choose to erase, write over or re-use space from inactive apps as and when it sees fit, depending in what other things your device needs to do.

Having fairly full RAM on some systems is not always a bad thing. With a properly tuned system, it just allows for faster use of needed data in RAM, increasing performance.

Hope this helps!

**Fun fact:**
Many systems can actually use a compression algorithm with the data it stores in RAM, essentially gaining better use of the available space at the expense of some CPU usage. That means a 4GB disk can be made to fit way more in it than 4GB of raw files, for example, so the old joke about “installing more RAM” as a downloadable add-on is not actually all that mental.

ZRAM under Linux is an example of this, if you want to do some more reading.

You are viewing 1 out of 6 answers, click here to view all answers.