Sounds like it doesn't have an OOM killer.
Announcement
Collapse
No announcement yet.
Apple's iPad
Collapse
X
-
Originally posted by Hauldren Collider View PostDude, from what I've seen the iPad simply DOESN'T SUPPORT virtual memory. It doesn't multitask. This "multitasking" is a COMPLETE HACK.
EDIT: Bah I'm conflating virtual memory with something else. I'm not talking about swap. Maybe Asher knows what I mean? Protected memory space, you know, where the OS gives you a fraction of the memory. Agh, I can't remember what it's called.
Apps are guaranteed access to a fixed amount of memory that varies per device (more on iPhone 3GS, less on iPhone 2G/3G) which is simply the difference between total system RAM and RAM used by the OS.
There's a reason Wiggy's phone crashes "every 6 hours" (or whatever), it's because the app development paradigm for the phone is your app has complete control. Full access to all memory.
Any multitasking backported to these phones is a hack of some sort. You can't invent more RAM.
It may be different on the iPad and new iPhones that have more RAM."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
Originally posted by Wiglaf View PostSounds like you were wrong.
Until now (which may change tomorrow), RAM has been a fixed commodity on the iPhone. There was no need for the overhead involved in memory monitoring and alerting of the app when there's low memory. It was treated just like a game console was -- you ran one app at a time, and that's all you do. The #1 cause of crashes on the iPhone, and the reason you sometimes need to reboot the phone before playing some games to prevent crashing, is memory leaks. The reason these leaks are a problem is the phone simply isn't smart enough to handle out of memory errors, it just crashes."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
Originally posted by Hauldren Collider View PostSo basically, I was right Asher? There's kernel memory and user memory, but user memory isn't further subdivided. That about right?
The problem is the assumptions that Apple told the developers for years were safe to make: yours was the only app running, you can use all the memory on the device you want.
If you decide your app needs 90MB of memory (a safe assumption on any iPod/iPhone device), you can go ahead and allocate that. If that memory is not available, the app just crashes. This is why many games require you to reboot your phone if you're experiencing crashing -- other apps have leaked memory and not freed it up...
The problem here is if you've got an app running using 70% of the iPhone's RAM, then the next app you're running also wants to use 70% of the iPhone's RAM...what do you do? There's only one answer on the iPhone: crash."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
Originally posted by Hauldren Collider View PostI ****ing hate memory leaks, but I ****ing hate segfaults more. 4 gigs of ram ftw!
Or use java. *barfs*
Speaking of Java, guess what the iPhone and iPad DON'T HAVE?
The problem is Apple chose not to put that feature on the iPhone/iPod runtimes, for performance reasons. In a lot of ways, the programming tools for the iPhone are a generation or two behind what's available for Android, WebOS, and Windows Phone."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
The problem here is if you've got an app running using 70% of the iPhone's RAM, then the next app you're running also wants to use 70% of the iPhone's RAM...what do you do? There's only one answer on the iPhone: crash.
Comment
-
Originally posted by Wiglaf View PostYou act like this can't be fixed tomorrow.
The 'fix' tomorrow is precisely as I talked about earlier: Instead of running both apps at the same time, it'll persist the state (kind of like hibernating your computer, but only for one app), then switch applications. It's not true multitasking."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
So what you're saying is that the iPhone does have protected memory, but malloc calls try to grab the whole thing and often don't account for the possibility of the OS refusing the call? So then, if you did have two apps running, you WOULDN'T be able to have one app writing to another app's stuff, but one could whore all the memory and cause the other to segfault.
Another question though, I know Mac OSX is UNIX-based, and you don't normally have to enter a password on the iphone, so how does it handle root priveledges? How are programs prevented from becoming root and doing whatever?If there is no sound in space, how come you can hear the lasers?
){ :|:& };:
Comment
-
Originally posted by Hauldren Collider View PostSo what you're saying is that the iPhone does have protected memory, but malloc calls try to grab the whole thing and often don't account for the possibility of the OS refusing the call?
So then, if you did have two apps running, you WOULDN'T be able to have one app writing to another app's stuff, but one could whore all the memory and cause the other to segfault.
They might add in safeguards to OS 4 -- capture the malloc failures then pause the app to write the state out of the offending app to some page file, for instance. Still not true multitasking. Just can't happen with the RAM issue.
Another question though, I know Mac OSX is UNIX-based, and you don't normally have to enter a password on the iphone, so how does it handle root priveledges? How are programs prevented from becoming root and doing whatever?"The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
So then what is the root password? Or does it use a wheel group to prevent use of setuid?
Also it would need to use some of the flash rom as swap space if it persists one of the apps...slow, and uses up storage space. And you can't really use this kind flash as virtual memory because of write limits so they can't just implement swap in the standard way.Last edited by Hauldren Collider; April 7, 2010, 17:28.If there is no sound in space, how come you can hear the lasers?
){ :|:& };:
Comment
Comment