Memory - taking from airplay heap?

Hi,

Airplay allocates it’s heap memory up front when the app loads. However, when I load my level on the iPhone 3G, I get level 2 iOS warnings about low memory. I could be wrong, but if this happens I think it should happen when the app starts, not later or during execution.

Could you confirm whether cocos2d-airplay is allocating memory from the airplay heaps and not directly from the OS?

Thanks,
Mike

Airplay SDK allocates defined amount of heap memory at the time the application starts. Heap size is determined in app.icf file.
If the user does not specify the value of heap memory, the airplay SDK uses the default value = 3Mb (3,145,728 bytes).

Hi Max,

Thanks for your response. I’m aware that Airplay SDK allocates the heap on startup, I have already defined this as 50 meg. However, the application is getting memory warnings from the operating system much later after the app has loaded (I browse a menu, then load a level).

The question is: Does cocos2d use the airplay heap? It doesnt allocate extra memory in addition to the airplay heap, right?

Thanks
Mike

Yes - cocos2d-x uses only the memory that gave Airplay SDK. Additional memory allocation for cocos2d-x on the Airplay SDK is impossible (as far as I understand it). This limitation is conditioned by the ideology of mobile applications (if you have in mind really multiplatform application) - need to know the limit of memory and work within these limits.
In addition I want to say that the current version of the module Airplay SDK for cocos2d-x requires verification of real-world applications - I made this port but fully testing it has not been made - try it - and do not hesitate to participate in the development :wink:

There are so many memory problems.
I cant load more than 2 1024x1024 sprite sheets in 50Mb of memory.

That sucks.