Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/handles.cpp @ 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 | f34d701e952e |
children | 9758d9f36299 |
comparison
equal
deleted
inserted
replaced
10269:a9270d9ecb13 | 10271:f9be75d21404 |
---|---|
177 | 177 |
178 // Unlink this from the thread | 178 // Unlink this from the thread |
179 _thread->set_last_handle_mark(previous_handle_mark()); | 179 _thread->set_last_handle_mark(previous_handle_mark()); |
180 } | 180 } |
181 | 181 |
182 void* HandleMark::operator new(size_t size) { | |
183 return AllocateHeap(size, mtThread); | |
184 } | |
185 | |
186 void* HandleMark::operator new [] (size_t size) { | |
187 return AllocateHeap(size, mtThread); | |
188 } | |
189 | |
190 void HandleMark::operator delete(void* p) { | |
191 FreeHeap(p, mtThread); | |
192 } | |
193 | |
194 void HandleMark::operator delete[](void* p) { | |
195 FreeHeap(p, mtThread); | |
196 } | |
197 | |
182 #ifdef ASSERT | 198 #ifdef ASSERT |
183 | 199 |
184 NoHandleMark::NoHandleMark() { | 200 NoHandleMark::NoHandleMark() { |
185 HandleArea* area = Thread::current()->handle_area(); | 201 HandleArea* area = Thread::current()->handle_area(); |
186 area->_no_handle_mark_nesting++; | 202 area->_no_handle_mark_nesting++; |