Thanks
MAT shows the following
The class*"android.content.res.Resources"*, loaded by*"<system class
loader>"*, occupies*2,805,432 (26.30%)*bytes. The memory is accumulated
in one instance of*"java.lang.Object[]"*loaded by*"<system class loader>"*.
*Keywords*
java.lang.Object[]
android.content.res.Resources
Clicking Details
Class Name Shallow Heap Retained Heap
* java.lang.Object[509] @ 0x40db12d8 <mat://object/0x40db12d8>
2,048 2,797,424
\
* *mValues*android.util.LongSparseArray @ 0x40ac0a00
<mat://object/0x40ac0a00>
24 2,801,536
.\
* *sPreloadedDrawables*class android.content.res.Resources @
0x40ac0700 <mat://object/0x40ac0700>*Unknown, System Class*
48 2,805,432
One instance of*"android.graphics.Bitmap"*loaded by*"<system class
loader>"*occupies*2,138,456 (20.05%)*bytes. The memory is accumulated in
one instance of*"byte[]"*loaded by*"<system class loader>"*.
*Keywords*
android.graphics.Bitmap
byte[]
Clicking Details
Class Name Shallow Heap Retained Heap
* byte[2138400] @ 0x4134ce98
...................................................................................................................................................................................................................................................................
<mat://object/0x4134ce98>
2,138,416 2,138,416
\
* *mBuffer*android.graphics.Bitmap @ 0x412599e8 <mat://object/0x412599e8>
40 2,138,456
.\
* *mBitmap*android.graphics.drawable.BitmapDrawable @ 0x4125cee8
<mat://object/0x4125cee8>
64 136
..\
* *mBGDrawable*android.widget.FrameLayout @ 0x411e5230
<mat://object/0x411e5230>
464 1,072
...\
* *[0]*android.view.View[12] @ 0x41234ea0 <mat://object/0x41234ea0>
64 24,168
I'm not seeing a variable name, Is there anyway to find What variables
or Which Bitmap this is that is 2M in size ?
Thanks again
On 01/15/2012 11:13 AM, Mark Murphy wrote:
On Sun, Jan 15, 2012 at 11:06 AM, New Developer<secur...@isscp.com> wrote:
Is there a resource or link that helps you read what is going on with your
app
I'm plagued by an out of memory error and I have no idea why
Type Count Total Size Smallest
Largest Median
free 929 927.031 KB 16 B
554.344 KB 96 B
data object 33,460 1.220 MB 16 B
1,106 B 32 B
class object 2,703 782.062 KB 168 B
38.180 KB 168 B
1-byte array (byte[], boolean[]) 703 8.212 MB 24 B
2.039 MB 264 B
2-byte array (short[], char[]) 10,165 653.930 KB 24 B
28.023 KB 48 B
4-byte array (object[], int[], float[]) 5,123 327.000 KB 24 B
16.023 KB 40 B
8-byte array (long[], double[]) 16 5.922 KB 24 B
4.000 KB 128 B
non-Java object 129 5.930 KB 24 B
464 B 40 B
How can I trace this to an actual variable
Dump the heap and examine it using the Eclipse MAT plugin:
http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html
My main concerns are the 1-byte array esp. the 2.039 MB
I'm sure it is an Image or Bitmap I just don't know which one
I strongly encourage you to dump the heap in Honeycomb or Ice Cream
Sandwich then, as they do a much better job than do earlier versions
of Android of reporting bitmap memory.
--
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en