hotspot/src/share/vm/memory/allocation.cpp
changeset 9403 6f3c6231c20a
parent 8481 42a79b703814
child 10565 dc90c239f4ec
--- 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);
 }