"occupy y (z%) bytes of" memory problem "? I am trying to d...">

MAT: How do you diagnose "x instances of" byte [] "loaded by" <system class loader> "occupy y (z%) bytes of" memory problem "?

I am trying to diagnose a memory issue in my android app. I dumped the HPROF file and loaded it into the Eclipse MAT tool (see How to Analyze Memory Using Android Studio ). Now I am trying to figure out which are the listed "suspicious suspects"

I am wondering if the following situation indicates 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 [email protected]/. )..!*..)0 .'...!(..#'..04%.15'./6&.3;&[email protected];*.1<,.AN<.6C1.0;*.-6%.*1!./3$.24&./0".+3../7 .6:).=A3.YZT.hhf._]`.caf.STV.[]\[email protected]?.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? If not, do you know what the data of this byte might be?

+3


source share


1 answer


The problem with heapdumps is that you really need to know what is normal and abnormal regarding your application's behavior. Leaking suspects can give you an indicator, but it can also put you on the wrong foot.

To find out if the sizes of byte arrays are an issue, you can check their path to the GC root. This will at least tell you where the byte arrays were created.



When using MAT, I personally always look at the dominant tree. He should show you the biggest objects. You can also execute a grouploader, etc. from there.

This should give you more information.

+3


source







All Articles