Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,940 members, 7,810,611 topics. Date: Saturday, 27 April 2024 at 12:05 PM

Why Don’t Iphones Lag With A Small RAM? - Phones - Nairaland

Nairaland Forum / Science/Technology / Phones / Why Don’t Iphones Lag With A Small RAM? (263 Views)

Why Don’t Nigerians Keep Their Phones In Their Pockets? / How To Fix Dream League 2019 Lag On Camon 11 And Camon 11 Pro / Can The Following Games Work On A 1gb Ram Phone Without Lag (2) (3) (4)

(1) (Reply)

Why Don’t Iphones Lag With A Small RAM? by Nobody: 12:38pm On Jul 12, 2021
Each app and program in a phone or computer has to allocate memory for data like strings, data read from the server or collected from the user or internal services (like location). Or just for reformatting data for display to the user. Then when the app is done with that data it releases the memory it used. This happens very rapidly and very often while the app is being used. (I’ve seen 10–100 Kbytes of data allocated and freed in less than a second.

The iOS and Android use two different ways to allocate and free that memory. The iOS method is much more efficient in how effectively it uses memory. The Android method requires somewhat more than twice the memory that iOS needs since it uses something called garbage collection.

Android and iOS apps both allocate memory. But in Android the apps don’t actually released that memory when they’re done with it. Periodically garbage collection (GC) reviews all memory items allocated to see if they’re being used anymore, and if not, then it frees that memory. It checks to see if anything has a reference to each allocated chunk of memory. If not, it can be freed. This happens periodically since the overhead to do this takes some time. (On a computer scale of time.) The more often this is done, the more time it can take up, but the slower this is done, the more extra memory RAM is needed to allow for the non-used, but not yet freed memory.

In iOS the system uses a different memory allocation method and the code frees the memory when it’s not used. Originally this was done by the software developer, now it’s incorporated automatically into the compiler. (There’s a number of technical details I’m glossing over here, but that’s basically what happens.) There’s a minor amount of overhead to do this automatically, but it is much much less than GC takes.

The result is that iOS avoids the computational overhead of garbage collection (which can cause problems in real-time applications), and it avoids the extra RAM size overhead that Androids have to have too. This reduces the size of the electronics somewhat, and also reduces some power use.

The “iOS only runs one app at a time” reason doesn’t hold because iOS apps have access to a range of background activities where the app can run. This has been true for quite some time now, and the number and range of background activities has increased. The iOS prefers to have one app at a time run for responsiveness to the user, not for memory issues.




https://qr.ae/pGkmDV

3 Likes 2 Shares

(1) (Reply)

How To Enjoy MTN 4me Offers On Data And Call Traffic / Whatsapp Is Working On Messages Disappearing After 90 Days / Screenshot And Post Your Data Usage In The Month Of August

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.