src/share/vm/memory/allocation.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7089790_headers_only Sdiff src/share/vm/memory

src/share/vm/memory/allocation.cpp

Print this page
rev 2694 : imported patch headers_only


  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/allocation.hpp"
  27 #include "memory/allocation.inline.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "runtime/os.hpp"
  30 #include "runtime/task.hpp"
  31 #include "runtime/threadCritical.hpp"
  32 #include "utilities/ostream.hpp"
  33 #ifdef TARGET_OS_FAMILY_linux
  34 # include "os_linux.inline.hpp"
  35 #endif
  36 #ifdef TARGET_OS_FAMILY_solaris
  37 # include "os_solaris.inline.hpp"
  38 #endif
  39 #ifdef TARGET_OS_FAMILY_windows
  40 # include "os_windows.inline.hpp"
  41 #endif



  42 
  43 void* CHeapObj::operator new(size_t size){
  44   return (void *) AllocateHeap(size, "CHeapObj-new");
  45 }
  46 
  47 void* CHeapObj::operator new (size_t size, const std::nothrow_t&  nothrow_constant) {
  48   char* p = (char*) os::malloc(size);
  49 #ifdef ASSERT
  50   if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
  51 #endif
  52   return p;
  53 }
  54 
  55 void CHeapObj::operator delete(void* p){
  56  FreeHeap(p);
  57 }
  58 
  59 void* StackObj::operator new(size_t size)  { ShouldNotCallThis(); return 0; };
  60 void  StackObj::operator delete(void* p)   { ShouldNotCallThis(); };
  61 void* _ValueObj::operator new(size_t size)  { ShouldNotCallThis(); return 0; };




  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/allocation.hpp"
  27 #include "memory/allocation.inline.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "runtime/os.hpp"
  30 #include "runtime/task.hpp"
  31 #include "runtime/threadCritical.hpp"
  32 #include "utilities/ostream.hpp"
  33 #ifdef TARGET_OS_FAMILY_linux
  34 # include "os_linux.inline.hpp"
  35 #endif
  36 #ifdef TARGET_OS_FAMILY_solaris
  37 # include "os_solaris.inline.hpp"
  38 #endif
  39 #ifdef TARGET_OS_FAMILY_windows
  40 # include "os_windows.inline.hpp"
  41 #endif
  42 #ifdef TARGET_OS_FAMILY_bsd
  43 # include "os_bsd.inline.hpp"
  44 #endif
  45 
  46 void* CHeapObj::operator new(size_t size){
  47   return (void *) AllocateHeap(size, "CHeapObj-new");
  48 }
  49 
  50 void* CHeapObj::operator new (size_t size, const std::nothrow_t&  nothrow_constant) {
  51   char* p = (char*) os::malloc(size);
  52 #ifdef ASSERT
  53   if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
  54 #endif
  55   return p;
  56 }
  57 
  58 void CHeapObj::operator delete(void* p){
  59  FreeHeap(p);
  60 }
  61 
  62 void* StackObj::operator new(size_t size)  { ShouldNotCallThis(); return 0; };
  63 void  StackObj::operator delete(void* p)   { ShouldNotCallThis(); };
  64 void* _ValueObj::operator new(size_t size)  { ShouldNotCallThis(); return 0; };


src/share/vm/memory/allocation.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File