how the systems work
Android uses a Linux kernel and a Java virtual machine to run apps. When you switch to another app, the current app keeps running in the background. This is called a true background running mechanism.
iOS uses a background tombstone mechanism, which means the app stops working when you switch to another app.
There are also differences in how Android and iOS handle message pushing. Android is simpler, with apps actively pushing their latest messages to users. iOS uses a unified push model with Apple services to avoid multiple apps sending messages at once.
As apps get more complex, they need more memory. Since Android apps run in virtual machines, they need more memory than iOS apps. But iOS is more efficient without needing much memory.
The app ecology is different too. iOS is strict and developers need powerful optimization mechanisms to adapt to Apple’s hardware. Android is more open and developers don’t have to think as much about hardware.
So even if the same app runs on Android and iOS, it will use different amounts of memory. This is because of the system differences and how well the developer optimized the app.