Action Listener, Determing which button was pressed

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 -Xshare:eek:ff 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.
 
T

Thomas Hawtin

Roedy said:
then on top of that you might have multiple instances of those
classes.

Each instance will be around two dozen bytes. You will need a lot of
buttons (which come in at a few K each, IIRC) for that to be a problem.

Tom Hawtin
 
C

Chris Uppal

Thomas said:
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). [...]
I have no idea why Perm Gen is not considered part of "the heap".

The only justification I can think of would be that it wasn't GCed (as is also
suggested -- in fact implied -- by the name "Perm Gen"), but that is manifestly
not the case.

Ho hum...

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,348
Latest member
RoscoeNevi

Latest Threads

Top