flash - What is the maximum amount memory Adobe AIR can utilize? -


i've been doing rapid prototyping game i'm thinking of building. 1 of main things want map generation tile type map. while generating map end using large amounts of ram. i'm building map array of random integers test. when try generate maps of large scale flash gives me out of memory error:

error: error #1000: system out of memory. 

i've figured write file instead, solve problem. know actual maximum size? i've tried searching around no avail.

activity monitor reports adl using around 500mb "real memory" , around 700mb "virtual memory". system.privatememory property seems match "real memory" value.

as side note i'm developing in osx snow leopard (64) 8gb ram

edit:

here example test running

var ba:bytearray = new bytearray(); for(var i:uint = 0; i<100000000; i++) {     ba.writeint(int(math.random()*100)); }  trace("end", ba.length, system.totalmemory); 

this example runs fine, afterwards total memory property reports around 500mb of ram used. increasing target value 400,000,000 receive 'out of memory' error.

note: testing in flash cs5.5 timeout set 120 seconds (the test never reaches time)

edit:

i've created better testing example:

var i:uint = 0; var looplength:number = 500000000; // 500,000,000 var ba:bytearray = new bytearray();  for(i=0;i<looplength;i++){     try{ba.writeint(1);}     catch(e:error){         mem_ti.appendtext(e.message);         break;     } }      ba.position = 0; mem_ti.appendtext("\ntm: "+system.totalmemory+" fm: "+system.freememory+" pm: "+system.privatememory+" balength: "+ba.bytesavailable/4); 

when run script browser, stand-alone debugger or air same memory usage readouts (which know vary anyway). constant final length of byte array:

browser (firefox): tm: 540413952 fm: 19116032 pm: 562573312 balength: 134217728

stand-alone: tm: 540577792 fm: 1810432 pm: 545361920 balength: 134217728

air (2.6): tm: 5410816 fm: 1159168 pm: 551464960 balength: 134217728

my testing methods might not perfect, though dont know how deeper profiling.

as of windows 7, , air 3.3 adobe air apps limited around 1gb memory allocation. change once adobe air becomes 64-bit. adobe plans 2 different rewrites of platform. first rewrite take place end of 2012. rewrite add multithreading flash, air runtimes. first rewrite not fix existing memory allocation issues , limitations. second rewrite sure coming in 2013 codenamed "next". rewrite "actionscript 4.0" includes 64-bit runtime, memory allocation enhancements, programming language enhancements, new compiler, , huge improvement in performance. until not try allocate more 900mb of ram @ risk of app simple crashing without warning.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -