title: dead class loaders not garbage collected from permgen
body: <p>I see the following from "jmap -permstat":</p>
  
  <pre><code>0x000000077736cce0      12      173472  0x00000007723425d0      dead    com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl$TransletClassLoader@0x00000007c83bea70
  0x0000000777168a20      12      172264  0x00000007723425d0      dead    com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl$TransletClassLoader@0x00000007c83bea70
  0x0000000780b3c810      12      172264  0x00000007723425d0      dead    com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl$TransletClassLoader@0x00000007c83bea70
  0x0000000776ca6170      12      172264  0x00000007723425d0      dead    com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl$TransletClassLoader@0x00000007c83bea70
  0x00000007772b28a8      12      172264  0x00000007723425d0      dead    com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl$TransletClassLoader@0x00000007c83bea70
  ....
  </code></pre>
  
  <p>There are over 6000 of these dead TransletClassLoader class loaders in permGen now, and number keeps growing until I get this error:</p>
  
  <blockquote>
    <p>java.lang.OutOfMemoryError: PermGen space</p>
  </blockquote>
  
  <p>I have the following JVM flag set:</p>
  
  <blockquote>
    <p>-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled</p>
  </blockquote>
  
  <pre><code>java version "1.6.0_33"
  Java(TM) SE Runtime Environment (build 1.6.0_33-b04)
  Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
  </code></pre>
  
  <p>Why are these dead class loaders not getting cleaned up with the CMSClassUnloadingEnabled flag on?  How do I fix this problem?</p>