1.1 --- a/src/share/vm/memory/allocation.hpp Thu Aug 29 21:46:09 2013 +0200 1.2 +++ b/src/share/vm/memory/allocation.hpp Thu Aug 29 18:56:29 2013 -0400 1.3 @@ -204,12 +204,12 @@ 1.4 1.5 template <MEMFLAGS F> class CHeapObj ALLOCATION_SUPER_CLASS_SPEC { 1.6 public: 1.7 - _NOINLINE_ void* operator new(size_t size, address caller_pc = 0); 1.8 + _NOINLINE_ void* operator new(size_t size, address caller_pc = 0) throw(); 1.9 _NOINLINE_ void* operator new (size_t size, const std::nothrow_t& nothrow_constant, 1.10 - address caller_pc = 0); 1.11 - _NOINLINE_ void* operator new [](size_t size, address caller_pc = 0); 1.12 + address caller_pc = 0) throw(); 1.13 + _NOINLINE_ void* operator new [](size_t size, address caller_pc = 0) throw(); 1.14 _NOINLINE_ void* operator new [](size_t size, const std::nothrow_t& nothrow_constant, 1.15 - address caller_pc = 0); 1.16 + address caller_pc = 0) throw(); 1.17 void operator delete(void* p); 1.18 void operator delete [] (void* p); 1.19 }; 1.20 @@ -219,9 +219,9 @@ 1.21 1.22 class StackObj ALLOCATION_SUPER_CLASS_SPEC { 1.23 private: 1.24 - void* operator new(size_t size); 1.25 + void* operator new(size_t size) throw(); 1.26 void operator delete(void* p); 1.27 - void* operator new [](size_t size); 1.28 + void* operator new [](size_t size) throw(); 1.29 void operator delete [](void* p); 1.30 }; 1.31 1.32 @@ -245,9 +245,9 @@ 1.33 // 1.34 class _ValueObj { 1.35 private: 1.36 - void* operator new(size_t size); 1.37 + void* operator new(size_t size) throw(); 1.38 void operator delete(void* p); 1.39 - void* operator new [](size_t size); 1.40 + void* operator new [](size_t size) throw(); 1.41 void operator delete [](void* p); 1.42 }; 1.43 1.44 @@ -316,7 +316,7 @@ 1.45 1.46 void* operator new(size_t size, ClassLoaderData* loader_data, 1.47 size_t word_size, bool read_only, 1.48 - Type type, Thread* thread); 1.49 + Type type, Thread* thread) throw(); 1.50 // can't use TRAPS from this header file. 1.51 void operator delete(void* p) { ShouldNotCallThis(); } 1.52 }; 1.53 @@ -339,7 +339,7 @@ 1.54 Chunk* _next; // Next Chunk in list 1.55 const size_t _len; // Size of this Chunk 1.56 public: 1.57 - void* operator new(size_t size, AllocFailType alloc_failmode, size_t length); 1.58 + void* operator new(size_t size, AllocFailType alloc_failmode, size_t length) throw(); 1.59 void operator delete(void* p); 1.60 Chunk(size_t length); 1.61 1.62 @@ -422,12 +422,12 @@ 1.63 char* hwm() const { return _hwm; } 1.64 1.65 // new operators 1.66 - void* operator new (size_t size); 1.67 - void* operator new (size_t size, const std::nothrow_t& nothrow_constant); 1.68 + void* operator new (size_t size) throw(); 1.69 + void* operator new (size_t size, const std::nothrow_t& nothrow_constant) throw(); 1.70 1.71 // dynamic memory type tagging 1.72 - void* operator new(size_t size, MEMFLAGS flags); 1.73 - void* operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags); 1.74 + void* operator new(size_t size, MEMFLAGS flags) throw(); 1.75 + void* operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags) throw(); 1.76 void operator delete(void* p); 1.77 1.78 // Fast allocate in the arena. Common case is: pointer test + increment. 1.79 @@ -583,44 +583,44 @@ 1.80 #endif // ASSERT 1.81 1.82 public: 1.83 - void* operator new(size_t size, allocation_type type, MEMFLAGS flags); 1.84 - void* operator new [](size_t size, allocation_type type, MEMFLAGS flags); 1.85 + void* operator new(size_t size, allocation_type type, MEMFLAGS flags) throw(); 1.86 + void* operator new [](size_t size, allocation_type type, MEMFLAGS flags) throw(); 1.87 void* operator new(size_t size, const std::nothrow_t& nothrow_constant, 1.88 - allocation_type type, MEMFLAGS flags); 1.89 + allocation_type type, MEMFLAGS flags) throw(); 1.90 void* operator new [](size_t size, const std::nothrow_t& nothrow_constant, 1.91 - allocation_type type, MEMFLAGS flags); 1.92 + allocation_type type, MEMFLAGS flags) throw(); 1.93 1.94 - void* operator new(size_t size, Arena *arena) { 1.95 + void* operator new(size_t size, Arena *arena) throw() { 1.96 address res = (address)arena->Amalloc(size); 1.97 DEBUG_ONLY(set_allocation_type(res, ARENA);) 1.98 return res; 1.99 } 1.100 1.101 - void* operator new [](size_t size, Arena *arena) { 1.102 + void* operator new [](size_t size, Arena *arena) throw() { 1.103 address res = (address)arena->Amalloc(size); 1.104 DEBUG_ONLY(set_allocation_type(res, ARENA);) 1.105 return res; 1.106 } 1.107 1.108 - void* operator new(size_t size) { 1.109 + void* operator new(size_t size) throw() { 1.110 address res = (address)resource_allocate_bytes(size); 1.111 DEBUG_ONLY(set_allocation_type(res, RESOURCE_AREA);) 1.112 return res; 1.113 } 1.114 1.115 - void* operator new(size_t size, const std::nothrow_t& nothrow_constant) { 1.116 + void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() { 1.117 address res = (address)resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL); 1.118 DEBUG_ONLY(if (res != NULL) set_allocation_type(res, RESOURCE_AREA);) 1.119 return res; 1.120 } 1.121 1.122 - void* operator new [](size_t size) { 1.123 + void* operator new [](size_t size) throw() { 1.124 address res = (address)resource_allocate_bytes(size); 1.125 DEBUG_ONLY(set_allocation_type(res, RESOURCE_AREA);) 1.126 return res; 1.127 } 1.128 1.129 - void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) { 1.130 + void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) throw() { 1.131 address res = (address)resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL); 1.132 DEBUG_ONLY(if (res != NULL) set_allocation_type(res, RESOURCE_AREA);) 1.133 return res;