简体   繁体   中英

Adobe Air Mobile Android Starling Application RAM usage

I am using starling 1.3 , Android 4.0.4 and adobe air 3.7 for this.

I am developing a simple application which is having almost simple UI and least animation.

I am measuring Application performance by starling.showStats = true.

In stats window I got only 8mb memory usage of application.

But if I look at settings->application->running->myApp then at that place I got 55 to 61 mb of memory usage.

I am shocked because of this strange memory difference.

Is there I am doing any thing wrong ?

Is this a normal thing?

Starling stats use System.totalMemory to measure amount of used memory. And as Adobe AS3 reference states:

This property does not return all memory used by an Adobe AIR application or by the application (such as a browser) containing Flash Player content. The browser or operating system may consume other memory. The System.privateMemory property reflects all memory used by an application.

So the number your app manager shows probably equals to what System.privateMemory would return.

The memory usage is likely coming from your bitmaps and will not be reported through Starling's stats display.

You can use Adobe Scout to get an accurate handle on your memory breakdown.

The memory footprint of a 512x512 RGBA (red, green, blue, with alpha) texture is 512 x 512 pixels x 4 bytes = 1,048,576 bytes = 1 MB (see the explanation here )

This quickly grows. If you have an atlas that's 2048x2048 the resulting memory usage would be about 16 MB.

Textures are expensive, and memory on mobile is precious - so it's good to be aware of these things early on so you can plan accordingly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM