VMRuntime.getRuntime()。setMinimumHeapSize姜饼的信教姜饼、VMRuntime、getRuntime、setMinimumHeapSize

2023-09-07 10:42:14 作者:努カ赚钱つ

我知道有一个VMRuntime.getRuntime()。setMinimumHeapSize中的Andr​​oid 2.1 / 2.2开发者调整应用程序的起始堆大小,这是最有效的解决方案,稳定部队解决了内存不足的错误之一期间BitmapFactory.de codeStream()

不过,由于Android 2.3,这VMRuntime类是从官方的API中删除,没有任何人知道这个功能的2.3替代API?

解决方案   

和它是最有效的解决方案,稳定部队在BitmapFactory.de codeStream()

解决了内存不足的错误之一

真的吗?设置最小堆大小可能会降低GC流失,但我希望能看到链接到它与帮助地方 OutOfMemoryError异常

  

不过,由于Android 2.3,这VMRuntime类是从官方的API中删除,没有任何人知道这个功能的2.3替代API?

有没有。这种行为不再暴露出来。

I know there's a VMRuntime.getRuntime().setMinimumHeapSize in Android 2.1/2.2 for developer to adjust the starting heap size of the application, and it is one of the most effective solution sfor solving the OutOfMemory error during BitmapFactory.decodeStream()

安全容器的发展与思考

However, since Android 2.3, this VMRuntime class is removed from official API, does anyone knows the alternative API of this function in 2.3?

解决方案

and it is one of the most effective solution sfor solving the OutOfMemory error during BitmapFactory.decodeStream()

Really? Setting the minimum heap size may reduce GC churn, but I would love to see links to places where it helped with OutOfMemoryErrors.

However, since Android 2.3, this VMRuntime class is removed from official API, does anyone knows the alternative API of this function in 2.3?

There is none. That behavior is no longer exposed.

 
精彩推荐