title: How to determine the size of PermGen within a Java application (i.e., programmatically)?
body: <ol>
  <li><p>Is there any way to measure the currently <em>used</em> size of permanent generation (PermGen) within my Java application? I cannot use external profiling tools such as VisualVM. </p></li>
  <li><p>Even better would be an estimation of the memory consumption of a Java class in the PermGen. Is it nearly proportional to the size of the bytecode file? </p></li>
  </ol>