I came to the following phenomenon when tracing a possible memory leak. Is Java 7 reclaiming interned Strings or jmap not precise?
# jmap -heap 9724 | grep interned Attaching to process ID 9724, please wait... Debugger attached successfully. Server compiler detected. JVM version is 23.3-b01 10526 interned Strings occupying 880048 bytes. # jmap -heap 9724 | grep interned Attaching to process ID 9724, please wait... Debugger attached successfully. Server compiler detected. JVM version is 23.3-b01 10514 interned Strings occupying 878984 bytes. # jmap -heap 9724 | grep interned Attaching to process ID 9724, please wait... Debugger attached successfully. Server compiler detected. JVM version is 23.3-b01 10519 interned Strings occupying 879720 bytes.
Environment: Linux version 2.6.32-220.23.1.el6.centos.plus.x86_64 (mockbuild@c6b5.bsys.dev.centos.org) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Tue Jun 19 04:14:37 BST 2012
java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)