I'm trying to diagnose a memory issue in my Android app. I dumped an HPROF file and have it loaded up in the Eclipse MAT tool (see How to analyze memory using android studio). I'm now trying to make sense of the listed "Leak Suspects"
I'm wondering if the following is indicative of a real problem:
23 instances of "byte[]", loaded by "<system class loader>" occupy 5,504,576 (12.74%) bytes.
Biggest instances:
byte[1077600] @ 0x43c523e0 rM!.rM!.tO#.wR&.zU).}X,..[/..]1..[/..[/..\0..\0..[/..Z...[/..\0..]7..]7..^8..^8..]7..\6.}Z4.}Z4.|Z4.|Z4.{Y3.zX2.zX2.zX2.zX2.{Y3.xX2.wW1.vV0.uU/.tS0.sR/.qS/.qS/.qS/.oQ-.oQ/.pR0.pS1.pS1.oR0.mP..sN1.sN1.sN1.rM0.sO/.sO/.uN/.uN/.xO/.xO/.xP-.wO,.yN+.yN+.{P-.|Q..... - 1,077,616 (2.49%) bytes.
byte[960000] @ 0x4383ef88 ................................................................................................................l.y.n.{.}...........................................l}s............................................................................................ - 960,016 (2.22%) bytes.
byte[563200] @ 0x42bd8c40 7@/. )..!*..)0 .'...!(..#'..04%.15'./6&.3;&.DL5.NX@.AJ5.0;*.1<,.AN<.6C1.0;*.-6%.*1!./3$.24&./0".+3../7 .6:).=A3.YZT.hhf._]`.caf.STV.[]\.GLH.@E?.KQG.JRE.BJ;.9B1.04..9C .=J..7H..>L2.RZO.[`\.[[Y.ceb.fhe.ikh.gif.bda._a^.ac`.egd.ad].^aZ.[^W.[^W.\_X.\_X.Z]V.WZS.... - 563,216 (1.30%) bytes.
byte[563200] @ 0x42c69660 46+.)+ .%'..%&.."#..#$..&'!.%& .%'..')..)+ .+-".,.#.+-".)+ .(*..,.#.+-".*,!.*,!.)+ .)+ .*,!.*,!.)+ .(*..(*..)+ .,.#..0%./1&./1&.,-%.*+#.()!.'( .'( .'( .&'..$%..&&..&&..&&..&&..&&..&&..&&..&&..'&!.'&!.'&!.'&!.'&!.'&!.'&!.'&!.** .++!...$.11%.33'.34&.23%.23%.... - 563,216 (1.30%) bytes.
byte[563200] @ 0x42cf7310 ---................................................................................................................................................................................................................................................................ - 563,216 (1.30%) bytes.
byte[563200] @ 0x42d85fe8 ................................................................................................................................................................................................................................................................... - 563,216 (1.30%) bytes.
byte[563200] @ 0x42e13f10 ..................................................................................................................................................................}...}...}...}...|...|...|...|...{...{...{...{...{...{...{...{...{...{...{...{...{...{...{...{.... - 563,216 (1.30%) bytes.
If so, how would you suggest tracking it down? If it's not, do you know what this byte data might be?
The problem with heapdumps is that you really need to know what is normal and abnormal with regards to the behaviour of your application. The "Leak Suspects" could give you an indicator, but it might also put you on the wrong foot.
To figure out if the sizes of the byte arrays are the problem you could check their path to the GC root. That will at least tell you where the byte arrays have been created.
While using MAT I personally always look at the dominator tree. It should show you the biggest objects. You can from there also group by class loader, etc.
That should give you some more insights.