简体   繁体   English

Adobe Air Mobile Android Starling应用程序RAM使用情况

[英]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. 我为此使用starling 1.3,Android 4.0.4和adobe air 3.7

I am developing a simple application which is having almost simple UI and least animation. 我正在开发一个具有几乎简单的UI和最少动画的简单应用程序。

I am measuring Application performance by starling.showStats = true. 我正在通过starling.showStats = true来衡量应用程序性能。

In stats window I got only 8mb memory usage of application. 在统计窗口中,我只有8mb的应用程序内存使用情况。

But if I look at settings->application->running->myApp then at that place I got 55 to 61 mb of memory usage. 但是,如果我查看设置->应用程序->运行-> myApp,那么在那个地方我有55到61 mb的内存使用量。

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. Starling统计信息使用System.totalMemory来衡量已使用的内存量。 And as Adobe AS3 reference states: 并作为Adobe AS3参考说明:

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. 此属性不会返回Adobe AIR应用程序或包含Flash Player内容的应用程序(例如浏览器)使用的所有内存。 The browser or operating system may consume other memory. 浏览器或操作系统可能会占用其他内存。 The System.privateMemory property reflects all memory used by an application. System.privateMemory属性反映应用程序使用的所有内存。

So the number your app manager shows probably equals to what System.privateMemory would return. 因此,您的应用程序管理器显示的数字可能等于System.privateMemory将返回的数字。

The memory usage is likely coming from your bitmaps and will not be reported through Starling's stats display. 内存使用情况很可能来自您的位图,不会通过Starling的统计信息显示报告。

You can use Adobe Scout to get an accurate handle on your memory breakdown. 您可以使用Adobe Scout来准确处理内存故障。

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 ) 512x512 RGBA(红色,绿色,蓝色,带有Alpha)纹理的内存占用量为512 x 512像素x 4字节= 1,048,576字节= 1 MB(请参见此处的说明)

This quickly grows. 这种增长很快。 If you have an atlas that's 2048x2048 the resulting memory usage would be about 16 MB. 如果您有一个2048x2048的地图集,那么产生的内存使用量将约为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. 纹理很昂贵,移动设备上的内存很宝贵-因此最好早点意识到这些事情,以便您可以进行相应的计划。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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