First take the heap dump either with,

  1. jmap

JAVA_HOME/bin/jmap -dump:format=b,file=dump.bin
JAVA_HOME/bin/jmap -dump:format=b,file=dump.bin 19225

2. Obtain the heap dump using a java startup parameter

-XX:+HeapDumpOnOutOfMemoryError

3. Parse & Analyse the dump with Eclipse (I have used Memory Analyzer (MAT)), Following diagram should be self explanatory,

eclipse2