mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 13:54:38 +02:00
6962931: move interned strings out of the perm gen
Reviewed-by: never, coleenp, ysr, jwilhelm
This commit is contained in:
parent
1ed31f9194
commit
fe899cc10d
14 changed files with 58 additions and 41 deletions
|
@ -530,7 +530,7 @@ oop StringTable::basic_add(int index, Handle string_or_null, jchar* name,
|
|||
|
||||
Handle string;
|
||||
// try to reuse the string if possible
|
||||
if (!string_or_null.is_null() && string_or_null()->is_perm()) {
|
||||
if (!string_or_null.is_null() && (!JavaObjectsInPerm || string_or_null()->is_perm())) {
|
||||
string = string_or_null;
|
||||
} else {
|
||||
string = java_lang_String::create_tenured_from_unicode(name, len, CHECK_NULL);
|
||||
|
@ -662,7 +662,7 @@ void StringTable::verify() {
|
|||
for ( ; p != NULL; p = p->next()) {
|
||||
oop s = p->literal();
|
||||
guarantee(s != NULL, "interned string is NULL");
|
||||
guarantee(s->is_perm(), "interned string not in permspace");
|
||||
guarantee(s->is_perm() || !JavaObjectsInPerm, "interned string not in permspace");
|
||||
|
||||
int length;
|
||||
jchar* chars = java_lang_String::as_unicode_string(s, length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue