Reputation: 191
does anyone knows how to simulate low ram on an android device? I want to test my app with low RAM, but the emulator is too slow and i'd like to be able to test it on my HTC one running it only with 512 MB of ram.
Is it possible? Thanks in advance
Upvotes: 2
Views: 2747
Reputation: 1197
One option would be create a non-swappable application that dynamically uses up main memory to maintain average available free memory ~= 512 Mb. By non-swappable I mean that it should not be swapped out of main memory by the kernel memory-manager at any time. In Windows this is done using a VirtualLock (http://msdn.microsoft.com/en-us/library/aa366895%28VS.85%29.aspx) that prevents a memory region from being swapped out. Not sure how this can be done in Android though...
Upvotes: 0
Reputation: 1918
The android emulator can run really smooth if you have an Intel CPU on your machine. In order to use to create a smooth emulator, you'll need the following:
1 Install Intel HAXM on your computer. Available here http://software.intel.com/en-us/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-microsoft
2 Create a new AVD in AVD Manager, and for CPU select Intel Atom (x86)
3 Make sure you check Use Host GPU option
4 Start the emulator. If everything is ok, you should see a message like this
Upvotes: 2