Mercurial > hg > graal-compiler
diff src/share/vm/runtime/synchronizer.cpp @ 10130:6f817ce50129
8010992: Remove calls to global ::operator new[] and new
Summary: disable use of global operator new and new[] which could cause unexpected exception and escape from NMT tracking.
Reviewed-by: coleenp, dholmes, zgu
Contributed-by: yumin.qi@oracle.com
author | minqi |
---|---|
date | Fri, 19 Apr 2013 11:08:52 -0700 |
parents | cc32ccaaf47f |
children | 5a9fa2ba85f0 |
line wrap: on
line diff
--- a/src/share/vm/runtime/synchronizer.cpp Thu Apr 18 14:03:37 2013 -0400 +++ b/src/share/vm/runtime/synchronizer.cpp Fri Apr 19 11:08:52 2013 -0700 @@ -1012,7 +1012,8 @@ // Both the local and global free lists are empty -- resort to malloc(). // In the current implementation objectMonitors are TSM - immortal. assert (_BLOCKSIZE > 1, "invariant") ; - ObjectMonitor * temp = new ObjectMonitor[_BLOCKSIZE]; + ObjectMonitor * temp; + NEW_C_HEAP_OBJECT_ARRAY(temp, ObjectMonitor, _BLOCKSIZE, mtInternal, 0, AllocFailStrategy::RETURN_NULL); // NOTE: (almost) no way to recover if allocation failed. // We might be able to induce a STW safepoint and scavenge enough