Using Disk Space as RAM

Discussion in 'iOS Development' started by Angelic, Apr 8, 2008.

  1. Angelic

    Angelic New Member

    Joined:
    Dec 31, 2007
    Messages:
    40
    Likes Received:
    7
    Alright,

    If you didn't already know, I'm an MIT student majoring in Computer Science. I'm currently working on the Quake 3 project.

    Anyway, I was sitting around the other day and wondered "The iPod Touch uses Flash Memory instead of a spinning disk. So why couldn't we use that as RAM, and make the touch a bit more fluent?"

    I'm still wondering. If anyone else is interested, I'm going to see if I can do just that. It would basically function as a Linux Swap partition (or, for you Windows users, a ReadyBoost partition and/or Paging File), allowing you to run many, many more programs that you currently can, without draining battery. (It wouldn't drain the battery because the disk does not have to spin, it is simply accessed because it's flash).

    Let me know what you think.
    2 people like this.
  2. tian_kr

    tian_kr New Member

    Joined:
    Mar 26, 2008
    Messages:
    935
    Likes Received:
    6
    sounds damn good
  3. Puredudes

    Puredudes New Member

    Joined:
    Dec 26, 2007
    Messages:
    407
    Likes Received:
    0
    Device:
    iPod touch
    so basiccly we will be able to run more programs and will the ipod run faster than with less lagg?
  4. [AFX]

    [AFX] Well-Known Member

    Joined:
    Nov 4, 2007
    Messages:
    1,246
    Likes Received:
    134
    if you are talking about a RAMDisk, I'm definetly down for that.
  5. simonrichards150

    simonrichards150 New Member

    Joined:
    Oct 29, 2007
    Messages:
    2,058
    Likes Received:
    94
    Device:
    iPod touch
    So is the point to allow applications to use more RAM than is physically available?

    If so, great, but you mentioned ReadyBoost. Theres not much point to that as in this case the storage disk is the same speed as the flash memory, because obviously its all flash memory, so I don't see where the speed increase will come from.

    EDIT: Having read below post, I think this is a genius idea.

    Please Register or Log in to view images

  6. Angelic

    Angelic New Member

    Joined:
    Dec 31, 2007
    Messages:
    40
    Likes Received:
    7
    Pretty much. I mean, think about it. What is RAM on a computer but flash memory? And what does the iPod store data on? Flash memory. So the process will go sorta like this:

    A user opens Safari. The Safari program is launched and it's active code is run in RAM. The user clicks the home button. Now, normally, the Safari application would just run in the background... sucking up precious RAM. Instead, the application state is stored in a binary file, and stored in a separate partition.

    Now the user opens the Calendar. He adds an entry, and hits the home button again. The Calendar state is saved to another binary file and stored alongside the one for Safari. The user hits the Safari icon again. The system checks the ramdisk-like partition to see if the program's state was stored. It was, so it opens the binary file, dumps the contents into RAM, and the user can now continue working with Safari.

    A pretty simple process. Just gotta see if I can get that working

    Please Register or Log in to view images



    Yeah, I was just trying to get some of the more basic windows users to understand

    Please Register or Log in to view images

    As far as I can tell, the RAM is separate from the drive space in the iPod touch, so we would be using equally-as-fast drive space as a secondary RAM module, in essence.
  7. [AFX]

    [AFX] Well-Known Member

    Joined:
    Nov 4, 2007
    Messages:
    1,246
    Likes Received:
    134
    hehe, i knew what you were talking about. i use a RAMDisk on my pocket PC for internet cache mainly. instead of bogging it down with all of this cache, it just writes to a file on my SD Card instead, which gives me more program memory instead of the opposite. this would be a very useful move for the iPod/iPhone.
  8. PatIsLegend

    PatIsLegend New Member

    Joined:
    Mar 30, 2008
    Messages:
    140
    Likes Received:
    1
    Device:
    iPod touch
    cant wait to see if this happens...im no developer so good luck Angelic

    Please Register or Log in to view images

  9. Nt1440

    Nt1440 New Member

    Joined:
    Nov 9, 2007
    Messages:
    1,431
    Likes Received:
    26
    are the read/write rates fast enough to do this? jw cuz as far as i no their not amazing (that or itunes just bottlenecks its rates for some reason)
  10. 318aye

    318aye New Member

    Joined:
    Jan 29, 2008
    Messages:
    138
    Likes Received:
    1
    Device:
    iPod touch
    also, would this be packagable with any quake project in installer? i don't see your average fanboy who flips over the quake app being able to repartition his ipod's flash memory.

Share This Page