hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 3810 467c462a4525
parent 1388 3677f5f3d66b
child 3811 e8139278d5d7
equal deleted inserted replaced
3580:55775b48f5e5 3810:467c462a4525
  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       }