diff src/share/vm/prims/whitebox.cpp @ 20630:787c9c28311f

8058251: assert(_count > 0) failed: Negative counter when running runtime/NMT/MallocTrackingVerify.java Summary: Fixed an issue when overflowing the MallocSite hash table bucket Reviewed-by: coleenp, gtriantafill
author ctornqvi
date Tue, 11 Nov 2014 10:48:06 -0800
parents 80260967f994
children 887a7cedb892
line wrap: on
line diff
--- a/src/share/vm/prims/whitebox.cpp	Tue Nov 11 10:46:07 2014 -0800
+++ b/src/share/vm/prims/whitebox.cpp	Tue Nov 11 10:48:06 2014 -0800
@@ -300,7 +300,7 @@
 // NMT picks it up correctly
 WB_ENTRY(jlong, WB_NMTMalloc(JNIEnv* env, jobject o, jlong size))
   jlong addr = 0;
-    addr = (jlong)(uintptr_t)os::malloc(size, mtTest);
+  addr = (jlong)(uintptr_t)os::malloc(size, mtTest);
   return addr;
 WB_END
 
@@ -309,7 +309,7 @@
 WB_ENTRY(jlong, WB_NMTMallocWithPseudoStack(JNIEnv* env, jobject o, jlong size, jint pseudo_stack))
   address pc = (address)(size_t)pseudo_stack;
   NativeCallStack stack(&pc, 1);
-  return (jlong)os::malloc(size, mtTest, stack);
+  return (jlong)(uintptr_t)os::malloc(size, mtTest, stack);
 WB_END
 
 // Free the memory allocated by NMTAllocTest