review (S) for 7032129: Native memory usage grow unexpectedly for vm/oom/*InternedString tests

Tom Rodriguez tom.rodriguez at oracle.com
Thu Mar 31 12:02:46 PDT 2011


Thanks!

tom

On Mar 31, 2011, at 11:46 AM, John Coomes wrote:

> 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