Java memory: where are the references coming from?

131 views Asked by At

I have a Java program that is using a lot of memory. I used jmap -histo:live to track down the objects that are using all the memory. There are only a couple of types that are using up most of the memory, there are > 1M of them, but I can't tell where the references are coming from.

Is there any way to tell from the command line what types of objects are holding references to these?

Thanks!

1

There are 1 answers

0
punx120 On BEST ANSWER

You can try to look at Eclipse MAT, you can do a Heap Dump and then look at objects histogram and search for objects having reference to the "big" objects you're mentionning.