What is the maximum amount memory Adobe AIR can utilize?

前端 未结 4 1825
离开以前
离开以前 2021-02-19 22:08

I\'ve been doing some rapid prototyping for a game I\'m thinking of building. one of the main things i want to do is map generation for a tile type map. While generating the map

相关标签:
4条回答
  • 2021-02-19 22:38

    There's no details provided, but my gut feeling would be that the problem you're having is not lack of memory (which your system has ample) but suboptimal and/or faulty algorhythms. You probably need to rethink the way you generate the maps and also be sure that you're not ending up in an infinite loop somewhere.

    If you post more details (possibly in another question) maybe we can be more helpful.

    0 讨论(0)
  • 2021-02-19 22:38

    Not sure if you're already on this but you can play around with the property System.totalMemory to get a live readout of the amount of memory that flash is using at that moment (all instances of Flash Player/adl, so watch out if you have a browser open with flash content playing)

    Link: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/System.html#totalMemory

    It may help to display the memory used in a textfield on the screen or add it to a watch list as you debug to find out exactly what classes/methods are eating up all that ram! You could also take readings of the totalMemory and put in breakpoints to stop the program when it hits a certain threshold.

    It may also help to only generate a map large enough for what is on the screen, and generate further territory as the player moves in a certain direction and culling the territory that is out of bounds. This form of culling is popular in 3D games to eliminate unseen geometry but will also help for your problem of massive maps and limited memory.

    0 讨论(0)
  • 2021-02-19 22:39

    As of Windows 7, and AIR 3.3 Adobe AIR apps are limited to around 1GB memory allocation. This will change once Adobe AIR becomes 64-bit. Adobe plans to do 2 different rewrites of the platform. The first rewrite will take place by the end of 2012. This rewrite will add multithreading to the Flash, AIR runtimes. This first rewrite probably will not fix the existing memory allocation issues and limitations. But the second rewrite will for sure which is coming in 2013 codenamed "Next". This rewrite is the "ActionScript 4.0" which includes 64-bit runtime, memory allocation enhancements, programming language enhancements, new compiler, and a huge improvement in performance. Until then do not try to allocate more than 900MB of RAM at the risk of the app simple crashing without warning.

    0 讨论(0)
  • 2021-02-19 22:42

    I've investigated this issue a bit recently and indeed there seems to be a memory threshold (dependent on the platform and, it seems, especially on the OS) after which an AIR app will become unresponsive / crash. (I didn't manage to get the out-of-memory Error #1000 though). I've opened an Adobe bug here: https://tracker.adobe.com/#/view/AIR-4198476. Hopefully we'll get some more info from Adobe soon.

    0 讨论(0)
提交回复
热议问题