Using JVisualVM to examine source of "retained" objects (aka memory leaks)

181 views Asked by At

I have a network server app that receives messages in an in-memory queue that are first received on a tcp socket. The messages are then processed and supposedly discarded.

The queue (just a java.util.concurrent.ArrayBlockingQueue) is consistently in a 1 to 2 message size: there is no backup or reference holding there.

Otherwise - there are no in-memory maps, lists, buffers, etc of the messages: they are processed then discarded.So it is unclear to me where to look.

here is a glimpse of the retained memory from the jvisualvm: we can see that 96% of the heap memory is within these byte[] arrays. So .. fix that and the app should be flying again.

enter image description here

Given I have pored through the code - does jvisualvm have a means to "drill down" on those byte arrays to see who is holding references to them?

**Update: from suggestion by @VinceEmigh here is the "Record Allocation stack traces" location:

enter image description here

0

There are 0 answers