Are there any ways to determine the amount of memory allocation for each class in the program?

  • jol - etki
  • I glanced out of the corner of my eye, but is there anything with visualization and so that I could look specifically at the classes of my project? - Kirill Stoianov

1 answer 1

The easiest option is to take a heap-dump and analyze it in Eclipse MAT (Memory Analyzer Tooling). How this is done can be found in the article . And already in the mat itself there are a lot of various tools - both for analyzing your code, and for analyzing interaction with third-party libraries.

UPD: In your case, you need to find the required class. And then - anything. The number of instances where they are generated, volumes, and so on.