Alternative Of Vmruntime.getruntime().setminimumheapsize In Gingerbread
Solution 1:
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.
Solution 2:
you can't increase the heap size dynamically.
you can request to use more by using android:largeHeap="true" in the manifest.
also, you can use native memory, so you actually bypass the heap size limitation.
here are some posts i've made about it:
and here's a library i've made for it:
Solution 3:
Similar answer to increase the heap size of the application
You cannot use VMRuntime post 2.2 but this functionality shall solve your purpose
Post a Comment for "Alternative Of Vmruntime.getruntime().setminimumheapsize In Gingerbread"