14 Replies Latest reply: Jul 18, 2010 12:25 PM by Joe Z in VA
KushKrime Level 1 Level 1 (0 points)
So for the last couple of days I've been playing with my new iPhone 4, and it's been quite the experience. Just out of curiosity I downloaded Memory Sweeper off the Apple Store to keep track of my available memory. Now, seeing as how the iPhone 4 has 512mb of memory this was all just for fun, but I kept noticing I only hovered around mid to high 200's in available memory. Seems odd that out of 512mb, I'm only getting 200mb free. Doesn't anyone agree it should be in the mid to low 400's? And does anyone have a clue what the drain could possibly be?

P.S. I only checked my memory when all apps were closed.

iPhone 4, iOS 4, 16GB
  • 1. Re: iPhone 4 Free Memory
    sirfaba Level 3 Level 3 (605 points)
    Try a soft reset. Hold down sleep/wake button and slide the red slider that appears. Then push the same button again to turn back on.
  • 2. Re: iPhone 4 Free Memory
    dbk9999 Level 1 Level 1 (55 points)
    I use "Free Memory". Warning, some people mistakenly believe the new version removed the ability to free memory, but they simply no longer have the button - it frees memory automatically, just start the app and watch the numbers change.

    I don't recall my highest number, and I don't think the Free Memory necessarily maxes it out. On a 3G, it will stop trying to free memory once it reaches 40 MB so, depending on who knows what, it may stop at 40 or you may get 45. I've even gotten close to 60 MB, but it rapidly comes back down to the 30's.

    With the new iphone, it seems to get me over 300 usually. Probably the best test is to not only have your apps cleared, but also completely shut the thing off and restart. I would think that checking then would give you the max number, roughly.

    I just finished clearing out the multi-tasking bar and restarted the phone. The Free Memory app showed 339 at first. Moved up in a few seconds to 344, and then seemed to settle in at around 338-339.

    I think you will also find that how much memory the OS takes up varies by phone. Computers do this as well. If you have more memory, more of the OS is loaded in.

    Consider that my numbers could mean that the OS is using 172 MB!!! But I ran the same OS on my 3G which only has 128 MB to begin with - and I could still get free memory to well over 40 MB.
  • 3. Re: iPhone 4 Free Memory
    ed2020 Level 1 Level 1 (50 points)
    KushKrime wrote:
    Doesn't anyone agree it should be in the mid to low 400's?


    Nope, I don't agree. "Free" RAM is wasted RAM (it is not serving any useful purpose at all) - a good memory manager should be allowing processes to use most of the RAM but keeping a track of what can be freed up should it be needed by other processes.

    Most programs that claim to help the OS's memory manager by freeing up (or "defragging") more RAM are snake oil. They certainly don't help an in a lot of cases make things worse.

    If you're not having problems with out of memory errors on your phone I wouldn't pay any attention to the numbers reported by this application at all.
  • 4. Re: iPhone 4 Free Memory
    red555 Level 4 Level 4 (2,550 points)
    sirfaba wrote:
    Try a soft reset. Hold down sleep/wake button and slide the red slider that appears. Then push the same button again to turn back on.


    I usually have around 250meg after a lot of useage and all apps closed. When I restart, it jumps up to around 355 Meg.
  • 5. Re: iPhone 4 Free Memory
    gilesjuk Level 2 Level 2 (195 points)
    So you don't think there should ever be free memory so give Application developers something to play with?

    3D games require a lot of memory for textures.
  • 6. Re: iPhone 4 Free Memory
    EBSkater Level 2 Level 2 (490 points)
    dbk9999 wrote:
    I use "Free Memory". Warning, some people mistakenly believe the new version removed the ability to free memory, but they simply no longer have the button - it frees memory automatically, just start the app and watch the numbers change.

    And it's people like you who are going to cause Apple to demand that this app be removed from the app store...
  • 7. Re: iPhone 4 Free Memory
    MrGimper Level 1 Level 1 (35 points)
    Free RAM is a waste. Take a PC for example, it would use any spare RAM to cache the filesystem, thus increasing performance.

    I can see a media frenzy.... "new iPhone 4 has RAM capacity flaw"
  • 8. Re: iPhone 4 Free Memory
    ed2020 Level 1 Level 1 (50 points)
    There should be RAM which can be made available if and when an application requests it, but that is not the same as free RAM. All these "memory defraggers" do is allocate a load of RAM to force the OS to page out useful data from RAM. This is not a good thing. And applications that run in the background constantly doing it are a bloody stupid idea.
  • 9. Re: iPhone 4 Free Memory
    gilesjuk Level 2 Level 2 (195 points)
    With solid state storage you don't need to cache for performance so much as with a hard disk.

    Write caching already takes place since you don't write individual bytes to flash memory as you wear it out faster.

    I wouldn't care if there was 2GB of RAM free, it would at least give developers something to play with. Or would you rather the device was crippled with low memory?

    I've seen Android phones with 384MB RAM. 512MB is better still, you should be thankful there is some capacity there for future developments.
  • 10. Re: iPhone 4 Free Memory
    EBSkater Level 2 Level 2 (490 points)
    ed2020 wrote:
    There should be RAM which can be made available if and when an application requests it, but that is not the same as free RAM. All these "memory defraggers" do is allocate a load of RAM to force the OS to page out useful data from RAM. This is not a good thing. And applications that run in the background constantly doing it are a bloody stupid idea.

    The iOS 4 is supposed to handle this issue with the LRU (Least Recently Used) algorithm. If the iOS sees that it needs more memory to run a program, then it will kill the app(s) that was (were) used last. Of course, in my opinion, the code and algorithms to manage memory can ALWAYS be tweaked to be more efficient, and with programs written poorly, it's always possible for apps to have memory leaks (but this is the devs' faults, NOT Apple's).
  • 11. Re: iPhone 4 Free Memory
    ed2020 Level 1 Level 1 (50 points)
    EBSkater wrote:
    ed2020 wrote:
    There should be RAM which can be made available if and when an application requests it, but that is not the same as free RAM. All these "memory defraggers" do is allocate a load of RAM to force the OS to page out useful data from RAM. This is not a good thing. And applications that run in the background constantly doing it are a bloody stupid idea.

    The iOS 4 is supposed to handle this issue with the LRU (Least Recently Used) algorithm. If the iOS sees that it needs more memory to run a program, then it will kill the app(s) that was (were) used last. Of course, in my opinion, the code and algorithms to manage memory can ALWAYS be tweaked to be more efficient, and with programs written poorly, it's always possible for apps to have memory leaks (but this is the devs' faults, NOT Apple's).


    I'm not sure whether you're arguing in favour of or against Memory Sweeper...?
  • 12. Re: iPhone 4 Free Memory
    EBSkater Level 2 Level 2 (490 points)
    ed2020 wrote:
    I'm not sure whether you're arguing in favour of or against Memory Sweeper...?

    I use a specific memory freeing app as a quick fix for when my phone is slowing down, so I don't have to restart it right then, but I'm still a big proponent of restarting daily. I noticed that I can restart the phone, then charge it fully and have it slowdown within 30 minutes, so I usually restart it in the morning, right after I take it off the charger.

    So I'm a quick fix proponent of memory freeing apps (although I don't personally use Memory Sweeper, but a different one), but for long term, I'm not.

    Also, my explanation of the iOS and the LRU algorithm was more of an explanation of how the iOS is SUPPOSED to handle this.

    I do see where you could get confused from my post though. I reread it, and it doesn't really seem to take a stance either for or against.
  • 13. Re: iPhone 4 Free Memory
    ed2020 Level 1 Level 1 (50 points)
    EBSkater wrote:
    ed2020 wrote:
    I'm not sure whether you're arguing in favour of or against Memory Sweeper...?

    I use a specific memory freeing app as a quick fix for when my phone is slowing down, so I don't have to restart it right then, but I'm still a big proponent of restarting daily. I noticed that I can restart the phone, then charge it fully and have it slowdown within 30 minutes, so I usually restart it in the morning, right after I take it off the charger.

    So I'm a quick fix proponent of memory freeing apps (although I don't personally use Memory Sweeper, but a different one), but for long term, I'm not.


    If the phone is slowing down because of running low on available RAM it's presumably because the memory manager is busy closing down apps and shifting their data from RAM back into flash. I suppose by running a memory freeing app you are forcing it to do this more aggresively and to do it at a time of your choosing (i.e. immediately), rather than its own (when you open your next app).

    Personally I'd rather resource-hogging, memory-leaking apps didn't find their way onto the App Store in the first place. Or failing that give us a way of identifying the culprit so we can kill that process individually without having to unnecessarily kill a load of other processes at the same time. I've been lucky that the apps I've chosen to install so far don't have memory leaks. The only time my phones get rebooted is when I update iOS or when I forget to charge them and they power themselves off. I've never experienced slowdowns or any other indication of a memory leak.

    Also, my explanation of the iOS and the LRU algorithm was more of an explanation of how the iOS is SUPPOSED to handle this.


    I think we've both described exactly the same process, just in slightly different terms.

    I do see where you could get confused from my post though. I reread it, and it doesn't really seem to take a stance either for or against.


    If this is a subject that interests you there's an excellent David Solomon video in which he explains why memory freeing applications are at best pointless and often make the problem even worse. Granted this is in the context of the Windows memory manager, but the principals are still much the same. You'd have to be very interested in the subject though - it's a couple of hours of video, so only for the truly nerdy.
  • 14. Re: iPhone 4 Free Memory
    Joe Z in VA Level 2 Level 2 (435 points)
    I closed all my apps and "System Activity Monitor" reports 350 free with no apps running except itself and background processes in Push, Mail, and the basic iPhone stuff.

    I ran a few dozen and ran it down to 20 free.