src/share/vm/memory/allocation.hpp

changeset 6472
2b8e28fdf503
parent 6462
e2722a66aba7
parent 5614
9758d9f36299
child 6507
752ba2e5f6d0
     1.1 --- a/src/share/vm/memory/allocation.hpp	Wed Oct 16 10:52:41 2013 +0200
     1.2 +++ b/src/share/vm/memory/allocation.hpp	Tue Nov 05 17:38:04 2013 -0800
     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,8 +219,8 @@
    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);
    1.26 +  void* operator new(size_t size) throw();
    1.27 +  void* operator new [](size_t size) throw();
    1.28  #ifdef __IBMCPP__
    1.29   public:
    1.30  #endif
    1.31 @@ -248,9 +248,9 @@
    1.32  //
    1.33  class _ValueObj {
    1.34   private:
    1.35 -  void* operator new(size_t size);
    1.36 +  void* operator new(size_t size) throw();
    1.37    void  operator delete(void* p);
    1.38 -  void* operator new [](size_t size);
    1.39 +  void* operator new [](size_t size) throw();
    1.40    void  operator delete [](void* p);
    1.41  };
    1.42  
    1.43 @@ -319,7 +319,7 @@
    1.44  
    1.45    void* operator new(size_t size, ClassLoaderData* loader_data,
    1.46                       size_t word_size, bool read_only,
    1.47 -                     Type type, Thread* thread);
    1.48 +                     Type type, Thread* thread) throw();
    1.49                       // can't use TRAPS from this header file.
    1.50    void operator delete(void* p) { ShouldNotCallThis(); }
    1.51  };
    1.52 @@ -342,7 +342,7 @@
    1.53    Chunk*       _next;     // Next Chunk in list
    1.54    const size_t _len;      // Size of this Chunk
    1.55   public:
    1.56 -  void* operator new(size_t size, AllocFailType alloc_failmode, size_t length);
    1.57 +  void* operator new(size_t size, AllocFailType alloc_failmode, size_t length) throw();
    1.58    void  operator delete(void* p);
    1.59    Chunk(size_t length);
    1.60  
    1.61 @@ -425,12 +425,12 @@
    1.62    char* hwm() const             { return _hwm; }
    1.63  
    1.64    // new operators
    1.65 -  void* operator new (size_t size);
    1.66 -  void* operator new (size_t size, const std::nothrow_t& nothrow_constant);
    1.67 +  void* operator new (size_t size) throw();
    1.68 +  void* operator new (size_t size, const std::nothrow_t& nothrow_constant) throw();
    1.69  
    1.70    // dynamic memory type tagging
    1.71 -  void* operator new(size_t size, MEMFLAGS flags);
    1.72 -  void* operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags);
    1.73 +  void* operator new(size_t size, MEMFLAGS flags) throw();
    1.74 +  void* operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags) throw();
    1.75    void  operator delete(void* p);
    1.76  
    1.77    // Fast allocate in the arena.  Common case is: pointer test + increment.
    1.78 @@ -586,44 +586,44 @@
    1.79  #endif // ASSERT
    1.80  
    1.81   public:
    1.82 -  void* operator new(size_t size, allocation_type type, MEMFLAGS flags);
    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) throw();
    1.85 +  void* operator new [](size_t size, allocation_type type, MEMFLAGS flags) throw();
    1.86    void* operator new(size_t size, const std::nothrow_t&  nothrow_constant,
    1.87 -      allocation_type type, MEMFLAGS flags);
    1.88 +      allocation_type type, MEMFLAGS flags) throw();
    1.89    void* operator new [](size_t size, const std::nothrow_t&  nothrow_constant,
    1.90 -      allocation_type type, MEMFLAGS flags);
    1.91 +      allocation_type type, MEMFLAGS flags) throw();
    1.92  
    1.93 -  void* operator new(size_t size, Arena *arena) {
    1.94 +  void* operator new(size_t size, Arena *arena) throw() {
    1.95        address res = (address)arena->Amalloc(size);
    1.96        DEBUG_ONLY(set_allocation_type(res, ARENA);)
    1.97        return res;
    1.98    }
    1.99  
   1.100 -  void* operator new [](size_t size, Arena *arena) {
   1.101 +  void* operator new [](size_t size, Arena *arena) throw() {
   1.102        address res = (address)arena->Amalloc(size);
   1.103        DEBUG_ONLY(set_allocation_type(res, ARENA);)
   1.104        return res;
   1.105    }
   1.106  
   1.107 -  void* operator new(size_t size) {
   1.108 +  void* operator new(size_t size) throw() {
   1.109        address res = (address)resource_allocate_bytes(size);
   1.110        DEBUG_ONLY(set_allocation_type(res, RESOURCE_AREA);)
   1.111        return res;
   1.112    }
   1.113  
   1.114 -  void* operator new(size_t size, const std::nothrow_t& nothrow_constant) {
   1.115 +  void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() {
   1.116        address res = (address)resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL);
   1.117        DEBUG_ONLY(if (res != NULL) set_allocation_type(res, RESOURCE_AREA);)
   1.118        return res;
   1.119    }
   1.120  
   1.121 -  void* operator new [](size_t size) {
   1.122 +  void* operator new [](size_t size) throw() {
   1.123        address res = (address)resource_allocate_bytes(size);
   1.124        DEBUG_ONLY(set_allocation_type(res, RESOURCE_AREA);)
   1.125        return res;
   1.126    }
   1.127  
   1.128 -  void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) {
   1.129 +  void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) throw() {
   1.130        address res = (address)resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL);
   1.131        DEBUG_ONLY(if (res != NULL) set_allocation_type(res, RESOURCE_AREA);)
   1.132        return res;

mercurial