简体   繁体   English

如何以编程方式增加RAM内存使用量?

[英]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.

相关问题 如何在Android中以编程方式增加RAM使用率? - How to increase RAM usage programmatically in Android? 如何增加Java和Cplex内存使用率 - How to increase Java and cplex memory usage Spark UI 存储选项卡下的“内存大小”显示了 Spark 流的 RAM 使用量随着时间的推移而增加 - "Size in Memory" under storage tab of spark UI showing increase in RAM usage over time for spark streaming ByteArrayOutputStream过度使用RAM内存 - Extream usage of RAM memory by ByteArrayOutputStream 如何以编程方式增加堆内存大小 - how do i increase Heap Memory Size Programatically 以编程方式使用 Kubernetes pod 内存 - Kubernetes pod memory usage programatically 如何通过JMX以编程方式查看我的应用程序的内存使用情况 - how to see memory usage of my application through the JMX using programatically 在Java中以编程方式增加CPU使用率和内存使用率 - Programmatically increase the CPU usage and memory usage in java Android-为什么片段替换后RAM使用率继续增加? - Android - Why RAM usage continues to increase after fragment replace? Android Studio 生成多个 java 进程! 如何在低内存机器上最小化其内存使用量? - Android Studio spawning multiple java processes! How to minimize its memory usage on a low-ram machine?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM