Original topic:

Why Android Devices Need So Much RAM?

(Topic created on: 01-01-2019 08:14 PM)
516 Views
BunnyGirl
Expert Level 4
Options
Others
From the very beginning, Android was      designed to support many different processor types, many different manufacturers, and many different hardware configurations. Normally, software written for one kind of system can’t just run on another; it has to be “ported” over, which often involves rewriting the incompatible bits.

To get around this, Android apps have always run on the Java platform. Java is nifty because of its virtual machine: you can write an app once in Java, and then the virtual machine “translates” that code at runtime to work on whatever system it’s on. Instead of rewriting and recompiling the code yourself, the Java virtual machine handles it for you.

But this comes with a cost!!!

The Java virtual machine is complex and requires a lot of RAM, not just to manage the actual processes of the virtual machine itself, but also to hold the original Java code for whatever app is being executed plus the translated code that actually gets executed by the system.

On the one hand, the virtual machine in Android has improved over the years and doesn’t require as much RAM as it once did. On the other hand, Android apps are becoming more and more advanced — arguably even bloated — and thus need more RAM to operate. RAM is also needed for background processes, which are common in Android apps.

Lastly, the Android operating system is built around a method called “garbage collection.” Apps are actually encouraged to use as much RAM as they need. Then, every once in a while, Android cleans up the data in RAM that’s no longer being used (“garbage”) and frees it, allowing other apps to use it. This method, while effective, is most optimal when there’s a lot of RAM to play with, otherwise the system spends too much time always collecting garbage.

For these reasons, we recommend at least 4GB of RAM on Android if you care about smooth performance. If you don’t, then 2GB should be the bare minimum.


6 Comments
SherryJay97263
Active Level 10
Others
wish you very happy New year 🙂
0 Likes
Others
👏
0 Likes
Aingaran
Active Level 3
Others
as a java developer and someone with interest in android operating system, I totally disagree..

fun fact, a java app cannot use more than 256mb of ram in android devices. ask any android developer. That's why games and graphics intensive applications are written in C++
0 Likes
kumar98498
Active Level 10
Others
its about the work load you put on..devices...
0 Likes
BunnyGirl
Expert Level 4
Others
then Why iPhone has just 3 GB?
0 Likes
BunnyGirl
Expert Level 4
Others
In Future Google is gonna Ditch Android.
it's already working on New OS
0 Likes