[英]How to increase the RAM Memory usage programatically?
I have a Scenario in that I need to increase the RAM usage of the phone programmatically. 我有一个场景,我需要以编程方式增加手机的RAM使用率。
I don't know whether it is possible. 不知道有没有可能 If so please help me on this. 如果是这样,请帮助我。
I assume you don't want to just waste memory, but what to know how to increase the maximum. 我想您不想浪费内存,而是知道如何增加最大值。
Normally you set the maximum. 通常,您设置最大值。 This is the largest value you would want the heap to be or exit the program. 这是您希望堆成为或退出程序的最大值。 If you set it high enough, you would never need to increase it. 如果将其设置得足够高,则无需增加它。
If you want the application to exit with less memory than this, you can just check the usage and exit the program. 如果要退出的应用程序使用的内存少于此值,则只需检查使用情况并退出程序即可。 (Though I can't think why you would) (尽管我不知道为什么会这样)
Check out This StackOverFlow Page . 签出此StackOverFlow页面 。
This page has Prevent out of Memory Exception. 此页面具有“防止内存不足异常”。
Think Opposite. 认为相反。
We can increase Ram usage through Native Side of Android .. We can make an Single Application to use more than 300Mb of Ram. 我们可以通过Android的Native Side增加Ram的使用量。我们可以使单个应用程序使用超过300Mb的Ram。 Since the OUT OF MEMORY exception is only for the Java Side (SDK) but not for the C side(NDK).. But in Android Memory management, if the system memory (as a whole) goes down a threshold value it will automatically kill application which uses more memory to re-gain memory.. 由于OUT OF MEMORY异常仅适用于Java端(SDK),而不适用于C端(NDK)。但是在Android内存管理中,如果系统内存(整体)下降到阈值 ,它将自动终止使用更多内存来重新获得内存的应用程序 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.