Hello. Tell me how to find out the size of the memory that the object occupies? Without JProfiler, there is no key. Are there any free tools? Interested in plugins for IDE, preferably for Idea.

  • one
    Use YourKit. - angry

1 answer 1

Not really a plugin, but nonetheless: JDK comes with a great Java VisualVM tool.

  • does not seem to be included, but it is necessary to swing separately - Gorets
  • Enters-enters. About here (for Windows): C:\Program Files\Java\jdk1.6.0_24\bin\jvisualvm.exe - Nofate
  • Included in 1.6. But I don’t understand how to look at the memory of my object there. let's say I slow down the application in debug after creating my object, then I connect to it with visualVM, I go to the profiler, click Memmory and I throw out the "Error" window, empty. Surely this is due to debug ... But how can I see how much my object occupies without it? - Vladimir
  • Go to Monitor , take a dump ( Heap Dump ), switch to Classes in a dump, find your class, right-click, Show in instances view , see instances of your class. - Nofate
  • I tried, still writes "Cannot heap dump" and does not write why. Maybe this is somehow connected with debagging? I do everything as described above, after creating my object I stop at breakpoint, after which I join in, and then everything as you describe ... - Vladimir