Close ad

The ideal amount of RAM that phones need for their smooth multitasking is quite a debated topic. Apple gets by with a smaller size in its iPhones, which is often more usable than Android solutions. You will also not find any kind of RAM memory management on the iPhone, whereas Android has its own dedicated function for this. 

If you go, for example, in Samsung Galaxy phones to Settings -> Device care, you will find a RAM indicator here with information on how much space is free and how much is occupied. After clicking on the menu, you can see how much memory each application is taking, and you also have the option to clear the memory here. The RAM Plus function is also located here. Its meaning is that it will bite off a certain number of GB from the internal storage, which it will use for virtual memory. Can you imagine something like this on iOS?

Smartphones rely on RAM. It serves them to store the operating system, to launch applications and also to store some of their data in the cache and buffer memory. Thus, RAM must be organized and managed in such a way that applications can run smoothly, even if you drop them to the background and open them again after a while.

Swift vs. Java 

But when starting a new application, you need to have free space in memory to load and run it. If this is not the case, the place must be vacated. The system will therefore forcefully terminate some running processes, such as applications that have already started. However, both systems, i.e. Android and iOS, work differently with RAM.

The iOS operating system is written in Swift, and iPhones don't actually need to recycle used memory from closed apps back into the system. This is due to the way iOS is built, because Apple has full control over it since it only runs on its iPhones. In contrast, Android is written in Java and is used on many devices, so it must be more universal. When the application is terminated, the space it took is returned to the operating system.

Native code vs. JVM 

When a developer writes an iOS app, they compile it directly into code that can run on the iPhone's processor. This code is called native code because it requires no interpretation or virtual environment to run. Android, on the other hand, is different. When Java code is compiled, it is converted to Java Bytecode intermediate code, which is processor-independent. It can therefore run on different processors from different manufacturers. This has huge advantages for cross-platform compatibility. 

Of course, there is also a downside. Each operating system and processor combination needs an environment known as the Java Virtual Machine (JVM). But native code performs better than code executed through the JVM, so using the JVM simply increases the amount of RAM used by the application. So iOS apps use less memory, on average 40%. That's also why Apple doesn't have to equip its iPhones with as much RAM as it does with Android devices. 

.