iPhone vs. iPod Touch

Apprentice
Posts: 14
Joined: 2008.10
Post: #16
You're wise to want to pick up a device for testing.

Straight from Cocoa Fundamentals:
Quote:More importantly, you should not assume that the performance of your application on the Simulator is the same as it would be on the device. The Simulator is essentially running your iPhone application as a "guest” Mac OS X application. As such, it has a 4GB memory partition and swap space available to it as it runs on a processor that is more powerful than the one on the device.

I'd recommend an 8 GB iPod Touch. I have a 1st gen, and it really is a great gadget!

bmantzey Wrote:I'm thinking about buying an iPhone to assist with development. I know there's a simulator and it works to a certain extent but I would feel more confident seeing my app on the actual device.
Quote this message in a reply
Member
Posts: 241
Joined: 2008.07
Post: #17
arekkusu Wrote:No. This is OS-specific.

And what does it mean, if the graphics memory is virtualized across all currently running processes?

lol, so if I upgrade my Operating System, it gives me more physical graphics memory!? COOL!! Grin
Quote this message in a reply
Member
Posts: 241
Joined: 2008.07
Post: #18
kodex Wrote:I find that the iPod Touch runs slightly faster then the iPhones, I suspect this is due to a lot more background processes running on the iPhone.

As far as memory I have gotten low memory warnings at just around 10 MBs, Try to keep it under 14 or you may find yourself in trouble.

You're talking about graphics memory, of course, right?
Quote this message in a reply
Moderator
Posts: 3,573
Joined: 2003.06
Post: #19
Wow, this is my longest post in a long time. Sorry about that. I tried to break it down better, but there's a lot of yak on this subject, and not a lot of documented facts to go off of.

bmantzey Wrote:You're talking about graphics memory, of course, right?
No, he's talking about system RAM.

I've been researching on this all day. Haven't come up with much new, but here are some facts and tidbits (most of which I was already aware of).

***** NOTE ***** While some of what I'm saying here is documented fact, coming from Apple, some of my interpretations may (likely) be bonkers, so be sure to self-administer plenty of salt. Wink

1) We all know Apple doesn't say much about how much RAM the iPhone has, or how much you get to play with, except as Zwilnik pointed out, they say to use as little as possible, and free things up when given a warning. This is the ultimate expression of "haziness" to me. I sure wish they'd at least say something like, "We'll guarantee you 10 MB minimum since only one 3rd party app can run at a time.", instead of "eh, maybe you'll get some RAM, maybe not..." I've been rolling along so far with a guess of maybe 30 MB, and am now disappointed that I gotta cut down to less than maybe half that, and Apple hadn't set out any clue whatsoever along the way (other than a memory warning system).

2) For OpenGL ES, Apple does say you should use no more than 24 MB for textures and surfaces (I take "surfaces" to mean render buffers). That hinted to me that I could maybe guess something like 20 or 30 MB might be reasonable for app RAM. I guess not.

3) While the iPhone uses "essentially the same virtual memory system" as OS X, it appears to be a "phony" system (for lack of a better term). There is apparently a little bit of system RAM set aside to use as virtual memory, but everything else that can't fit in that gets flushed from memory, not paged to disk -- poof, gone... because there is no swap file.

On point 1) There's a nice little article on getting some interesting system stats at http://furbo.org/2007/08/21/what-the-iph...-tell-you/ (look for source at the bottom of the page)

On point 2) They do not specify whether that memory (shared video memory) is reserved somewhere else in system RAM or if it resides locally in your app, sharing a piece of the broader picture with all the other GL apps. I assume it's local to the app, judging by the size of my own apps. Why they say ">>should<< only use 24 MB", I don't know. Is it a hard limit or a recommendation? Who knows... The reason I'm still curious about this is because if I know what part of my "real memory" is made up of OpenGL resources, and I know that those resources are not included in the system's low-memory calculation (i.e. not considered part of system RAM, but rather reserved video memory), I don't have to purge them or take them into low-memory situation account.

Continuing point 2) Again, this is a point of confusion for me because I've read in so many places (I know, not official) that the breakdown goes something like this: iPhone has 128 MB RAM, minus a small chunk that appears to be for the system, and minus a small chunk that appears to be used for VRAM, and another small chunk for virtual memory, leaving something like 70-80 MB for applications, depending on who's article you're reading (76 seems to be a popular figure). But the finer detail in there is that "small chunk for VRAM". Everyone seems to be subtracting that from system RAM, but it appears to me that at least part of the VRAM resides in my app. I'm assuming that the "real memory" stat is what I want to go off of, and that includes whatever shared VRAM is part of that. So now I'm switching as much of my textures to PVRTC as I can stand.

On point 3) I ran the memory test that longjumper put up, and it works as advertised, and is a very interesting demonstration. However, the large majority of that 730 MB has not been paged to disk, but has been theoretically flushed from memory. It is interesting how all that memory can supposedly be allocated though Wink
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How much can I stuff in to video ram? (on iPhone/iPod touch) Jamie W 9 10,010 Aug 6, 2010 05:23 AM
Last Post: mariocaprino
  Pause/Resume on IPod touch tonysameh 0 2,375 Jul 26, 2010 06:34 AM
Last Post: tonysameh
  iPod Touch not multitasking not working??? Toontingy 1 3,991 Jun 24, 2010 04:13 PM
Last Post: sealfin
  iPhone Only? Not for iPod Touch? daveh84 4 4,220 May 7, 2010 10:46 PM
Last Post: cmiller
  Detecting hardware, which iPhone/iPod I'm running on? Jamie W 9 7,577 Apr 13, 2010 11:27 AM
Last Post: Frank C.