Recently, because of system problems, memory analysis tools have been reviewed (for Eclipse)
Through the dump file, and then use the Memory Analysis tool on eclipse (it's easy to install online)
Memory Leak lookup Idea one:
Open "Details" under Leak Suspects->problem suspect N.
After you open this page, there are several things:
1, the reference cumulative relationship (shortest paths to the accumulation point)
2, storage objects (accumulated objects)
3, the storage object belongs to the class name (accumulated objects by Class)
This approach is simple and intuitive, knowing those objects to look for classes and reference points.
Memory leak Find Ideas two:
1, open the histogram (histogram), filter to find their own class, and then right-click on this record "list objects" under the Select "With incoming references"
Get to be those objects that reference this class.
2, then choose a right key from these object records "Path to GC Roots"-> "exclude weak references", get the hierarchical reference relationship, you know point.
If you are familiar with the code, you can guess that the class will cause a leak, you can use this method
Note: shallow vs. retained Heap
Shallow heap is the memory consumed by one object. An object needs/depending on the OS architecture/reference, 4 bytes per Integer, 8 bytes per Long, etc . Depending on the heap dump format the size is adjusted (e.g. aligned to 8, etc ...) to model better the real Consumptio N of the VM.
retained set of X is the set of objects which would being removed by GC where X is garbage collected.
retained heap of X is the sum of shallow sizes of all objects on retained set of X, i.e. memory kept by X.
For more detailed information can refer to help and online information.