hotspot/src/share/vm/memory/allocation.hpp
changeset 9403 6f3c6231c20a
parent 8481 42a79b703814
child 10547 ea4a2ec31ae2
equal deleted inserted replaced
9133:1c8d07466fdb 9403:6f3c6231c20a
    32 #endif
    32 #endif
    33 #ifdef COMPILER2
    33 #ifdef COMPILER2
    34 #include "opto/c2_globals.hpp"
    34 #include "opto/c2_globals.hpp"
    35 #endif
    35 #endif
    36 
    36 
       
    37 #include <new>
       
    38 
    37 #define ARENA_ALIGN_M1 (((size_t)(ARENA_AMALLOC_ALIGNMENT)) - 1)
    39 #define ARENA_ALIGN_M1 (((size_t)(ARENA_AMALLOC_ALIGNMENT)) - 1)
    38 #define ARENA_ALIGN_MASK (~((size_t)ARENA_ALIGN_M1))
    40 #define ARENA_ALIGN_MASK (~((size_t)ARENA_ALIGN_M1))
    39 #define ARENA_ALIGN(x) ((((size_t)(x)) + ARENA_ALIGN_M1) & ARENA_ALIGN_MASK)
    41 #define ARENA_ALIGN(x) ((((size_t)(x)) + ARENA_ALIGN_M1) & ARENA_ALIGN_MASK)
    40 
    42 
    41 // All classes in the virtual machine must be subclassed
    43 // All classes in the virtual machine must be subclassed
    97 #endif
    99 #endif
    98 
   100 
    99 class CHeapObj ALLOCATION_SUPER_CLASS_SPEC {
   101 class CHeapObj ALLOCATION_SUPER_CLASS_SPEC {
   100  public:
   102  public:
   101   void* operator new(size_t size);
   103   void* operator new(size_t size);
       
   104   void* operator new (size_t size, const std::nothrow_t&  nothrow_constant);
   102   void  operator delete(void* p);
   105   void  operator delete(void* p);
   103   void* new_array(size_t size);
   106   void* new_array(size_t size);
   104 };
   107 };
   105 
   108 
   106 // Base class for objects allocated on the stack only.
   109 // Base class for objects allocated on the stack only.