comparison src/share/vm/oops/instanceKlass.cpp @ 963:9601152ccfc1

6875393: 2/3 JNI itable index cache is broken Summary: Add missing initialization of cache size. Reviewed-by: tbell
author dcubed
date Fri, 28 Aug 2009 12:25:46 -0600
parents 1ee8caae33af
children 75e30968ebe1
comparison
equal deleted inserted replaced
880:2b4230d1e589 963:9601152ccfc1
1071 size_t length = 0; 1071 size_t length = 0;
1072 // array length stored in first element, other elements offset by one 1072 // array length stored in first element, other elements offset by one
1073 if (indices == NULL || (length = (size_t)indices[0]) <= idnum) { 1073 if (indices == NULL || (length = (size_t)indices[0]) <= idnum) {
1074 size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count()); 1074 size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count());
1075 int* new_indices = NEW_C_HEAP_ARRAY(int, size+1); 1075 int* new_indices = NEW_C_HEAP_ARRAY(int, size+1);
1076 new_indices[0] =(int)size; // array size held in the first element
1076 // Copy the existing entries, if any 1077 // Copy the existing entries, if any
1077 size_t i; 1078 size_t i;
1078 for (i = 0; i < length; i++) { 1079 for (i = 0; i < length; i++) {
1079 new_indices[i+1] = indices[i+1]; 1080 new_indices[i+1] = indices[i+1];
1080 } 1081 }