Browse Country  
Gender: Male
Age: 32
Sign: Leo
City: DELCO, PA
State: Pennsylvania
Country: United States

Email Blog to a Friend



Today Week Total
Posts 0 0 71
Comments 1 1 167
Views 9 30 8,039
Thumbs Up 2 2 140

Blog Archive


SUNDAY, DECEMBER 7, 2008 (7:13 AM) Return to Fudmottin's blog
So I've been looking into this whole "limited memory" thing
(I'm feeling crazy)


The iPhone dev documentation constantly harps on how little memory you have in a mobile device. Well I just counted how many 1MB blocks of memory I could allocate. Just to make sure the memory was committed, I zeroed it out (OK, I used calloc()). I was able to make 721 allocations. That does not count the 16 byte memory structures used to hold the MB blocks in a linked list.

So the iPhone 3G at least has over 720MB of usable RAM by an application. My PowerBook G4 doesn't even have that much RAM. It only has 640MB.

This makes me wonder just what you have to do to run into a low memory situation. If you need to have a really big block of memory, say 1GB, you can just use a memory mapped file.

BTW, I'm suffering from both frustration and fun with this iPhone programming shit. What a rush!

Category: Web, HTML, Tech
130 Views    |    2 Thumbs Up    |    3 Comments Add Comment   |    Email



Comments & Responses
Post Comment   

Posted Dec 5, 08 by Fudmottin
The VM space is 32 bits. That's 4GB. I don't know how that's laid out though. Memory mapping of files is available though for reasonably large files. eg, I can memory map a 1GB file to work with that and let the VM system deal with which pages are in RAM.

iPhone OS has a rather large intersection with OS X. It would be easier to list the differences rather than the similarities.

Posted Dec 4, 08 by Euchre      (  )
Making up for lost thumbs.

Posted Dec 4, 08 by Euchre
No one will need more than 720 mb of memory for a cell phone. ;-)
Don't see the signup form? Click here






Your Account
My Home
My Mail
My Videos
My Photos
My Blogs
My Groups
Tools
LiveCam (beta)
LiveVideo Lite
LiveVideo Xpress
LiveVideo Layouts
Developers
Promote
RSS
LiveVideo
What's New?
Report Bugs
Contact LiveVideo
Safety Tips
Terms of Service
User Rights Policy
Privacy Policy
Copyright
Sitemap
Support
Account
Channel
Copyright/Content
Director
Troubleshooting
Upload
Videos
© 2009 LiveVideo.com. All Rights Reserved.