I have a JVM with 12 gigs of total RAM, out of which 7 GB is allocated to the old generation. There seems to be some memory leak, because almost the entire old gen is full, and will not release when I schedule a GC (the process is not doing anything else at that time).
A jmap -histo dump only reveals less than 1 gigabyte worth of objects. Where are the missing 6 gigs? What better tool do you propose for diagnosing this?
Here is the top of the jmap output:
num #instances #bytes class name
----------------------------------------------
1: 429853 68725736 <constMethodKlass>
2: 429853 51594040 <methodKlass>
3: 37503 49611368 <constantPoolKlass>
4: 37503 31109576 <instanceKlassKlass>
5: 191716 28019968 [C
6: 32573 26933152 <constantPoolCacheKlass>
7: 86158 13789560 [I
8: 53532 11244232 [B
9: 284 10507216 [J
10: 137608 7210664 <symbolKlass>
11: 203072 6498304 java.lang.String
12: 10132 5219512 <methodDataKlass>
13: 39694 4128176 java.lang.Class
14: 55713 3792816 [S
15: 61816 3141936 [[I
16: 90109 2883488 java.util.HashMap$Entry