Android Cómo obtener el límite de tamaño de asignación actual (para evitar OutOfMemoryErrors)

I would like to get a size in bytes that states how much memory can I allocate at the moment. Like when I get an OutOfMemoryError while trying to allocate a bitmap, it says "allocation size exceeds VM Budget" - so I would like to know what is the maximum amount of bytes I can allocate at the moment, so I can free resources accordingly in order to make way for new allocations.
How do I go about getting this number? Thanks.

preguntado el 30 de enero de 12 a las 19:01

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.