--- a/hotspot/src/share/vm/memory/allocation.cpp Tue Apr 12 14:18:53 2011 -0700
+++ b/hotspot/src/share/vm/memory/allocation.cpp Wed Apr 27 09:09:57 2011 -0400
@@ -44,6 +44,14 @@
return (void *) AllocateHeap(size, "CHeapObj-new");
}
+void* CHeapObj::operator new (size_t size, const std::nothrow_t& nothrow_constant) {
+ char* p = (char*) os::malloc(size);
+#ifdef ASSERT
+ if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
+#endif
+ return p;
+}
+
void CHeapObj::operator delete(void* p){
FreeHeap(p);
}