Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.
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.
|
|
0 registered and 2 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: 9930
|
|
|
|
|
|
Powered by UBB.threads™ 6.5.5