< prev index next >

src/hotspot/share/prims/unsafe.cpp

Print this page
*** 352,11 ***
  
  ////// Allocation requests
  
  UNSAFE_ENTRY(jobject, Unsafe_AllocateInstance(JNIEnv *env, jobject unsafe, jclass cls)) {
    JvmtiVMObjectAllocEventCollector oam;
!   instanceOop i = InstanceKlass::allocate_instance(JNIHandles::resolve_non_null(cls), CHECK_NULL);
    return JNIHandles::make_local(THREAD, i);
  } UNSAFE_END
  
  UNSAFE_LEAF(jlong, Unsafe_AllocateMemory0(JNIEnv *env, jobject unsafe, jlong size)) {
    size_t sz = (size_t)size;
--- 352,11 ---
  
  ////// Allocation requests
  
  UNSAFE_ENTRY(jobject, Unsafe_AllocateInstance(JNIEnv *env, jobject unsafe, jclass cls)) {
    JvmtiVMObjectAllocEventCollector oam;
!   instanceOop i = InstanceKlass::allocate_instance(JNIHandles::resolve_non_null(cls), "unsafe", CHECK_NULL);
    return JNIHandles::make_local(THREAD, i);
  } UNSAFE_END
  
  UNSAFE_LEAF(jlong, Unsafe_AllocateMemory0(JNIEnv *env, jobject unsafe, jlong size)) {
    size_t sz = (size_t)size;
< prev index next >