review (S) for 7032129: Native memory usage grow unexpectedly for vm/oom/*InternedString tests
John Coomes
John.Coomes at oracle.com
Thu Mar 31 11:46:41 PDT 2011
Tom Rodriguez (tom.rodriguez at oracle.com) wrote:
> http://cr.openjdk.java.net/~never/7032129
>
> 7032129: Native memory usage grow unexpectedly for vm/oom/*InternedString tests
> Reviewed-by:
>
> StringTable::verify uses as_unicode_string to verify the hash code we
> keep in the table but the only resource mark is outside the loop.
> This means that verification makes a copy of the entire StringTable in
> a resource area. Now that interned strings aren't in perm the
> StringTable can become as large as the Java heap which means
> verification can overflow the address space. The fix is to compute
> the hash directly from the char[] instead of making a copy. I moved
> the hash_string logic into java_lang_String and updated the users
> appropriately. Tested with test case that allocates interned strings
> until we run out of heap.
Looks good to me.
-John
More information about the hotspot-dev
mailing list