News for hackers. Stuff that matters.
Re:Android phone hits 24GB of RAM, as much as a 13-inch MacB... by LoganDark on Thursday July 06, 2023 @08:42PM (#36625448)
> It seems like iOS and macOS do more with less ram. Why is that?

AFAIK, Android caches things in terms of the JVM/ART using Zygote, but macOS and iOS are designed to run native code, so they cache the actual dynamic libraries themselves (it's called the "dyld shared cache"). Things like libc, some core frameworks and so on go in there.

Keep in mind this happens across the entire OS, since the Android user experience is implemented largely in terms of high level JVM/ART objects with all of their associated heap overhead, but iOS and macOS and their apps are mainly implemented in C/C++, Swift, Objective-C, which at most use reference counting, and only for objects that need to be reference counted. This is absolutely not the cause of all memory issues but this is sort of the base level foundational stuff of both platforms and has implications for the higher levels.

Even though Android is based on Linux and iOS/macOS are based on Unix and BSD, and those two/three platforms are quite similar conceptually, they have very different userlands.

Re:Android phone hits 24GB of RAM, as much as a 13-inch MacB... by iudqnolq on Sunday July 09, 2023 @01:20PM (#36656424)
I get why refcounting could in theory sometimes have less latency than a highly tuned gc. But I don't see how it could possibly be lower memory. Can you explain?