< prev index next >

src/hotspot/share/oops/weakHandle.cpp

Print this page
rev 50534 : [mq]: rename_RootAccess

*** 46,66 **** oop* oop_addr = get_storage()->allocate(); if (oop_addr == NULL) { vm_exit_out_of_memory(sizeof(oop*), OOM_MALLOC_ERROR, "Unable to create new weak oop handle in OopStorage"); } // Create WeakHandle with address returned and store oop into it. ! RootAccess<ON_PHANTOM_OOP_REF>::oop_store(oop_addr, obj()); return WeakHandle(oop_addr); } template <WeakHandleType T> void WeakHandle<T>::release() const { // Only release if the pointer to the object has been created. if (_obj != NULL) { // Clear the WeakHandle. For race in creating ClassLoaderData, we can release this // WeakHandle before it is cleared by GC. ! RootAccess<ON_PHANTOM_OOP_REF>::oop_store(_obj, (oop)NULL); get_storage()->release(_obj); } } template <WeakHandleType T> --- 46,66 ---- oop* oop_addr = get_storage()->allocate(); if (oop_addr == NULL) { vm_exit_out_of_memory(sizeof(oop*), OOM_MALLOC_ERROR, "Unable to create new weak oop handle in OopStorage"); } // Create WeakHandle with address returned and store oop into it. ! NativeAccess<ON_PHANTOM_OOP_REF>::oop_store(oop_addr, obj()); return WeakHandle(oop_addr); } template <WeakHandleType T> void WeakHandle<T>::release() const { // Only release if the pointer to the object has been created. if (_obj != NULL) { // Clear the WeakHandle. For race in creating ClassLoaderData, we can release this // WeakHandle before it is cleared by GC. ! NativeAccess<ON_PHANTOM_OOP_REF>::oop_store(_obj, (oop)NULL); get_storage()->release(_obj); } } template <WeakHandleType T>
< prev index next >