Wednesday, March 2, 2011

Re: [android-developers] Re: Out of memory - despite being way under 16mb

Awesome,
Thanks Sean - I'll definitely try that out.

On Sat, Feb 26, 2011 at 2:35 AM, seanw <bitshiftboy@googlemail.com> wrote:


On Friday, February 25, 2011 8:12:29 PM UTC, Sheado wrote:
...
Dianne - that explains a lot, thank you. Is there any way to get an
accurate (bitmap included) picture of the heap in pre-honeycomb builds
of an app?

Hi,

You can use these functions;

Runtime.getRuntime().totalMemory()
android.os.Debug.getNativeHeapAllocatedSize())

The first one tells you how much memory is being used on the Dalvik heap and the second one tells you how much is being used on the native heap.

Regards,

Sean

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment