T
Thomas Hawtin
Chris said:I get the same using the 1.5 client VM. Each inner seems to add around 1.1K or
1.2K to the what jconsole/JMX calls the "Perm Gen" memory pool. (I haven't
been able to find any info relating the "Perm Gen" to the "Perm Gen [shared
ro]" and "Perm Gen [shared rw]" pools.)
I think the details go like this. The Perm Gen houses class data and
interned Strings (so don't intern Strings unless you really mean it).
The [shared ro] and [shared rw] is to do with Class Data Sharing (CDS).
Using either -server or -Xshareff should switch it off. The rw (read
write) section is presumably Copy-on-Write. Both sections are
initialised by a memory mapped file that is created during the install
process and contains data normally found in rt.jar.
On Linux you can see the mapped files with pmap. For 1.6 I get:
....
94280000 6184K r-xs- /usr/java/jdk1.6.0/jre/lib/i386/client/classes.jsa
9488a000 2008K rwx-- [ anon ]
94a80000 7596K rwx-- /usr/java/jdk1.6.0/jre/lib/i386/client/classes.jsa
951eb000 4692K rwx-- [ anon ]
95680000 896K rwx-- /usr/java/jdk1.6.0/jre/lib/i386/client/classes.jsa
95760000 3200K rwx-- [ anon ]
95a80000 16K r-xs- /usr/java/jdk1.6.0/jre/lib/i386/client/classes.jsa
....
I have no idea why Perm Gen is not considered part of "the heap".
But bare in mind I demonstrably don't know what I'm talking about.