In MAT I have Retained Heap with 0 Shallow Heap (?!?)

408 Views Asked by At

I'm analyzing a heap dump with Eclipse Memory Analyzer (MAT).

I have a line in Heap Histogram, where Objects and Shallow Heap are 0 but there is a big amount of Retained Heap.

enter image description here

What does it mean? Is it not assigned to an object instance but it's only a static content? Or is it a bug in MAT?

1

There are 1 best solutions below

0
On

AuthPolicy is an abstract class. As a result, there are no instances of that class. However, AuthPolicy does have some static fields source code of AuthPolicy. It does have a HashMap and ArrayList, The retained space is probably stuck in there:

...
public abstract class AuthPolicy {

    private static final HashMap   SCHEMES     = new HashMap();
    private static final ArrayList SCHEME_LIST = new ArrayList();
...