jhat

What does the class class [B represents in Java?

旧巷老猫 提交于 2019-11-28 16:58:26
问题 I am trying out a tool jhat here to test my java memory usage. It reads in a heap dump file and prints out information as html. However, the tables shows as follows: Class Instance Count Total Size class [B 36585 49323821 class [Lcom.sun.mail.imap.IMAPMessage; 790 16254336 class [C 124512 12832896 class [I 23080 11923504 class [Ljava.lang.Object; 13614 6664528 class java.lang.String 108982 2179640 class java.lang.Integer 219502 878008 What are those [B [C etc classes? 回答1: Those are arrays of

How to find a Java Memory Leak

南笙酒味 提交于 2019-11-25 23:13:44
问题 How do you find a memory leak in Java (using, for example, JHat)? I have tried to load the heap dump up in JHat to take a basic look. However, I do not understand how I am supposed to be able to find the root reference (ref) or whatever it is called. Basically, I can tell that there are several hundred megabytes of hash table entries ([java.util.HashMap$Entry or something like that), but maps are used all over the place... Is there some way to search for large maps, or perhaps find general