Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

More RAM for app

StoreboughtmilkStoreboughtmilk Posts: 118Registered Users
edited May 2012 in iPhone SDK Development
Hi Guys,

I have a quick question.

Is it possible to allot more ram to an app? or control its ram.

I have a very very image / document intensive app that is sucking a lll the RAM out of an iPad 1. End result, crappy, crashing app.

Any help would be much appreciated.

-Andrew
Post edited by Storeboughtmilk on

Replies

  • erika_wilsonerika_wilson Posts: 84Registered Users
    edited May 2012
    You should use better approach and properly handle low memory warnings more efficiently. And If allocating ram is the biggest matter maybe you just need a ram upgrade (assuming your computer's ram can be upgraded from where it is currently).
  • smithdale87smithdale87 Posts: 4,345iPhone Dev SDK Supporter
    edited May 2012
    You have no control over how much memory the system gives your application. You just have to respond to the notifications that the system is running low on memory. In low memory situations, you can trust that the system will close any non-critical background services to provide more memory for you application. But that will only go so far and then you need to get rid of any non-critical items that you have in memory as well.
  • Duncan CDuncan C Posts: 8,143Tutorial Authors, Registered Users
    edited May 2012
    Storeboughtmilk;433632 said:
    Hi Guys,

    I have a quick question.

    Is it possible to allot more ram to an app? or control its ram.

    I have a very very image / document intensive app that is sucking a lll the RAM out of an iPad 1. End result, crappy, crashing app.

    Any help would be much appreciated.

    -Andrew
    The iPad 1 is by far the most memory-starved of recent devices, relative to it's screen size. Apps that do a lot of full-screen graphics, high-res textures, etc, can get into trouble on that model.

    You need to write your app to do several things:

    Only load a given image when it is on-screen, and release it when not on-screen.

    For very large images, use a CATiledLayer to load the image in pieces as needed.

    If you're trying to do large UIView animations where you load an array of images, you might need to use a saved movie file instead. Movie display is optimized to stream the frames from disk and not keep everything in memory. UIImage animations, by contrast, require that you provide an array of images in memory.

    If you do those things, you should be able to keep the memory requirements reasonable.
    Regards,

    Duncan C
    WareTo

    mug

    Animated GIF created with Face Dancer, available for free in the app store.
Sign In or Register to comment.