How do I prevent AIR privateMemory from ballooning in Linux?
Okay, so we're making an AIR 2.7 App that runs on Linux. It swaps out child swf files all the time, the same five files, all loaded into the app once and playing in sequence.
Running on a Mac, the privateMemory continually reads around 400MB, give or take. Linux... Linux is weird.
Linux will start at about 200MB, and balloon. If we're lucky, Linux will decide to reclaim some memory, and we'll go back down to 200MB. If we're not lucky, we'll escalate past 2100MB at which point the app will crash (even though the box has 4GB of RAM).
I understand that System.privateMemory and System.gc() (both called regularly) is highly dependant on the OS, that's fine. But all methods of freeing up memory on Linux have failed, including cron jobs running methods outlined here: http://www.linuxarticles.org/2010/10/release-memory-in-linux-unused-or-cached/
To be clear: there is no memory leak. We cannot reproduce the problems we are experiencing in Linux with any other setup. And Linux can decide to run for days, releasing memory, reseting to around 200MB.
Is there any way to...
- Allow the AIR application to use the full amount of RAM, instead of crashing at 2GB
- From AIR, explicity release memory back to the Linux OS (System.gc() doesn't work)
- Via a cron command, explicity take memory from the AIR app?
