hotspot/src/share/vm/memory/allocation.cpp
changeset 26811 994a38f2afeb
parent 25946 1572c9f03fb9
child 27880 afb974a04396
child 27680 8ecc0871c18e
--- a/hotspot/src/share/vm/memory/allocation.cpp	Sun Sep 21 16:13:39 2014 +0200
+++ b/hotspot/src/share/vm/memory/allocation.cpp	Mon Sep 22 14:19:11 2014 -0400
@@ -693,14 +693,16 @@
 // compilers and they should be upwards compatible with C++11/14. Therefore
 // PLEASE BE CAREFUL if you change the signature of the following operators!
 
+static void * zero = (void *) 0;
+
 void* operator new(size_t size) /* throw(std::bad_alloc) */ {
   fatal("Should not call global operator new");
-  return 0;
+  return zero;
 }
 
 void* operator new [](size_t size) /* throw(std::bad_alloc) */ {
   fatal("Should not call global operator new[]");
-  return 0;
+  return zero;
 }
 
 void* operator new(size_t size, const std::nothrow_t&  nothrow_constant) throw() {