comparison src/share/vm/runtime/objectMonitor.hpp @ 10271:f9be75d21404

8012902: remove use of global operator new - take 2 Summary: The fix of 8010992, disable use of global operator new and new[] which caused failure on some tests. This takes two of the bugs also add ALLOW_OPERATOR_NEW_USAGE to prevent crash for third party code calling operator new of jvm on certain platforms. Reviewed-by: coleenp, dholmes, zgu Contributed-by: yumin.qi@oracle.com
author minqi
date Tue, 14 May 2013 09:41:12 -0700
parents c760f78e0a53
children f2110083203d
comparison
equal deleted inserted replaced
10269:a9270d9ecb13 10271:f9be75d21404
301 static PerfLongVariable * _sync_MonExtant ; 301 static PerfLongVariable * _sync_MonExtant ;
302 302
303 public: 303 public:
304 static int Knob_Verbose; 304 static int Knob_Verbose;
305 static int Knob_SpinLimit; 305 static int Knob_SpinLimit;
306 void* operator new (size_t size) {
307 return AllocateHeap(size, mtInternal);
308 }
309 void* operator new[] (size_t size) {
310 return operator new (size);
311 }
312 void operator delete(void* p) {
313 FreeHeap(p, mtInternal);
314 }
315 void operator delete[] (void *p) {
316 operator delete(p);
317 }
306 }; 318 };
307 319
308 #undef TEVENT 320 #undef TEVENT
309 #define TEVENT(nom) {if (SyncVerbose) FEVENT(nom); } 321 #define TEVENT(nom) {if (SyncVerbose) FEVENT(nom); }
310 322