< prev index next >

src/hotspot/share/oops/typeArrayKlass.cpp

Print this page
*** 93,11 ***
    return (typeArrayOop)Universe::heap()->array_allocate(this, (int)size, length,
                                                          do_zero, CHECK_NULL);
  }
  
  oop TypeArrayKlass::multi_allocate(int rank, jint* last_size, TRAPS) {
-   // For typeArrays this is only called for the last dimension
    assert(rank == 1, "just checking");
    int length = *last_size;
    return allocate(length, THREAD);
  }
  
--- 93,10 ---

*** 186,11 ***
        // Atomic create higher dimension and link into list
        MutexLocker mu(THREAD, MultiArray_lock);
  
        if (higher_dimension() == NULL) {
          Klass* oak = ObjArrayKlass::allocate_objArray_klass(
!               class_loader_data(), dim + 1, this, CHECK_NULL);
          ObjArrayKlass* h_ak = ObjArrayKlass::cast(oak);
          h_ak->set_lower_dimension(this);
          // use 'release' to pair with lock-free load
          release_set_higher_dimension(h_ak);
          assert(h_ak->is_objArray_klass(), "incorrect initialization of ObjArrayKlass");
--- 185,11 ---
        // Atomic create higher dimension and link into list
        MutexLocker mu(THREAD, MultiArray_lock);
  
        if (higher_dimension() == NULL) {
          Klass* oak = ObjArrayKlass::allocate_objArray_klass(
!               class_loader_data(), dim + 1, this, false, false, CHECK_NULL);
          ObjArrayKlass* h_ak = ObjArrayKlass::cast(oak);
          h_ak->set_lower_dimension(this);
          // use 'release' to pair with lock-free load
          release_set_higher_dimension(h_ak);
          assert(h_ak->is_objArray_klass(), "incorrect initialization of ObjArrayKlass");
< prev index next >