Max total memory size before app crashes.

Hi,

Does anyone know the max total memory size before the app crashes on gamesalad viewer for a iPhone 4, 4s, and 5.

Currently testing on iPhone 4 and loads with 82 mb images, 1 mb sound, 32 mb game engine, 25 mb other for a total of 140 mb when starting app. Once I'm about to have the scene reset its reached 220 mb total mainly from images and it doesn't restart scene it freezes.

Also another thing I noticed when testing on a iPhone 5 which works fine however when resetting the scene the other mb goes from 35 mb to 55 mb and never goes back down again. Does anyone know what would cause this to happen?

Thanks

Comments

  • grimtoothgrimtooth Member Posts: 69
    Something i found a while back on an answers forum thingy:


    Blocks from separate memory allocations are not allocated contiguously (separate calls to alloc, malloc, new, etc.). Otherwise they are allocated contiguously(from the same call to malloc, ex. new float[30]). According to Apple your app risks being shut down for memory usage when you use more than 20mb of ram. In practice however, you can get to about...

    260 MB of ram on iPad 2 (Thanks RobCroll)
    170-180MB of ram on devices with 512 Mb of ram total (iPhone 4, iPod touch 4g)
    40-80MB of ram on devices that have 256 MB of ram (iPad, iPhone 3gs, iPod touch 3g)
    25 MB on device with only 128MB of ram (IPhone 3g, iPhone 2g, iPod touch 1g-2g)
    If you really "need" that much ram for a mobile application, you should really save the data to a temp file and do your processing on that. An easy way to do that is by using memory mapped files.

    share|improve this answer
    edited Jun 2 at 8:16

    answered May 18 '11 at 12:07

    Skyler Saleh
    2,399724
  • games4fungames4fun Member Posts: 185
    Thanks for the mb amounts. How can I use memory mapped files.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited July 2013
    What version of creator are you using? 10.1 and 10.2 have memory issues. You can't do memory mapping with GS that's for Engines that you can code in.
  • games4fungames4fun Member Posts: 185
    I'm using version 10.3
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    The best thing to do is do an adhoc and use Xcode instruments to see the real usage. The viewer is not accurate.

Sign In or Register to comment.