Memory Footprint Targets

How do I know if I’m trying to use too much memory?

This is outside the issue of memory leaks. This is just plain benchmarking.

Using:

local function checkMemory() collectgarbage( "collect" ) local memUsage\_str = string.format( "MEMORY = %.3f KB", collectgarbage( "count" ) ) print( memUsage\_str, "TEXTURE = "..(system.getInfo("textureMemoryUsed") / (1024 \* 1024) ) ) end timer.performWithDelay( 1000, checkMemory, 0 )

 MEMORY = 1381.920 KB    TEXTURE = 105.32885742188  

According to StackOverflow,

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)

So let’s say I’m optimizing for the the 2 lowest ranges.

Does this add up to within range? I think so?