Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 958722

vlad_roubtsov
member


Reged: 06/21/03
Posts: 169
Re: Clarification!
      12/13/03 07:25 PM

Quote:

But does Java specification says anything about the string pool like whether it is maintained at the JVM level or class level?




I am not sure I understand you question 100% correctly.

If you are asking whether interned Strings are scoped to a JVM-global or class-scoped pool then the answer is obviously that the pool cannot be scoped to individual classes, because several loaded classes interning the same String value will end up (as required by the VM spec) sharing the same interned String instance.

If you are asking whether the intern pool must be implemented natively or in bytecode, then I don't believe the VM spec goes to this level of detail. It is possible to verify that recent JVMs don't even use the Java heap memory for interned Strings. That is, all interned Strings go into an internal native data area.

Post Extras Print Post   Remind Me!     Notify Moderator


Entire topic
Subject Posted by Posted on
* Clarification! Anonymous 12/13/03 12:56 PM
. * * Re: Clarification! vlad_roubtsov   12/13/03 07:25 PM
. * * Re: Clarification!    10/24/06 03:41 PM
. * * Re: Clarification! Erb   12/16/03 12:52 PM
. * * Re: Clarification! vlad_roubtsov   12/16/03 04:01 PM
. * * String literals piglet   01/23/06 12:17 PM

Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   



Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 9995

Rate this thread

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5