< prev index next >

src/share/vm/prims/jvmtiEnvBase.cpp

Print this page
rev 9088 : 8139040: Fix initializations before ShouldNotReachHere() etc. and enable -Wuninitialized on linux.

*** 510,520 **** // In the fullness of time, all users of the method should instead // directly use allocate, besides being cleaner and faster, this will // mean much better out of memory handling unsigned char * JvmtiEnvBase::jvmtiMalloc(jlong size) { ! unsigned char* mem; jvmtiError result = allocate(size, &mem); assert(result == JVMTI_ERROR_NONE, "Allocate failed"); return mem; } --- 510,520 ---- // In the fullness of time, all users of the method should instead // directly use allocate, besides being cleaner and faster, this will // mean much better out of memory handling unsigned char * JvmtiEnvBase::jvmtiMalloc(jlong size) { ! unsigned char* mem = NULL; jvmtiError result = allocate(size, &mem); assert(result == JVMTI_ERROR_NONE, "Allocate failed"); return mem; }
*** 1030,1040 **** ret.entry_count = count_locked_objects(owning_thread, hobj); } // implied else: entry_count == 0 } ! jint nWant, nWait; if (mon != NULL) { // this object has a heavyweight monitor nWant = mon->contentions(); // # of threads contending for monitor nWait = mon->waiters(); // # of threads in Object.wait() ret.waiter_count = nWant + nWait; --- 1030,1040 ---- ret.entry_count = count_locked_objects(owning_thread, hobj); } // implied else: entry_count == 0 } ! jint nWant = 0, nWait = 0; if (mon != NULL) { // this object has a heavyweight monitor nWant = mon->contentions(); // # of threads contending for monitor nWait = mon->waiters(); // # of threads in Object.wait() ret.waiter_count = nWant + nWait;
< prev index next >