< prev index next >

src/hotspot/share/gc/shared/collectedHeap.inline.hpp

Print this page




  55            "alignment_in_bytes %u is expect to be larger "
  56            "than the minimum object size", alignment_in_bytes);
  57     new_addr = addr + padding;
  58   }
  59 
  60   assert(new_addr > addr, "Unexpected arithmetic overflow "
  61          PTR_FORMAT " not greater than " PTR_FORMAT, p2i(new_addr), p2i(addr));
  62   if(new_addr < end) {
  63     CollectedHeap::fill_with_object(addr, padding);
  64     return new_addr;
  65   } else {
  66     return NULL;
  67   }
  68 }
  69 
  70 inline oop CollectedHeap::obj_allocate(Klass* klass, int size, TRAPS) {
  71   ObjAllocator allocator(klass, size, THREAD);
  72   return allocator.allocate();
  73 }
  74 





  75 inline oop CollectedHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) {
  76   ObjArrayAllocator allocator(klass, size, length, do_zero, THREAD);
  77   return allocator.allocate();
  78 }
  79 
  80 inline oop CollectedHeap::class_allocate(Klass* klass, int size, TRAPS) {
  81   ClassAllocator allocator(klass, size, THREAD);
  82   return allocator.allocate();
  83 }
  84 
  85 #endif // SHARE_GC_SHARED_COLLECTEDHEAP_INLINE_HPP


  55            "alignment_in_bytes %u is expect to be larger "
  56            "than the minimum object size", alignment_in_bytes);
  57     new_addr = addr + padding;
  58   }
  59 
  60   assert(new_addr > addr, "Unexpected arithmetic overflow "
  61          PTR_FORMAT " not greater than " PTR_FORMAT, p2i(new_addr), p2i(addr));
  62   if(new_addr < end) {
  63     CollectedHeap::fill_with_object(addr, padding);
  64     return new_addr;
  65   } else {
  66     return NULL;
  67   }
  68 }
  69 
  70 inline oop CollectedHeap::obj_allocate(Klass* klass, int size, TRAPS) {
  71   ObjAllocator allocator(klass, size, THREAD);
  72   return allocator.allocate();
  73 }
  74 
  75 inline oop CollectedHeap::obj_buffer_allocate(Klass* klass, int size, TRAPS) {
  76   ObjBufferAllocator allocator(klass, size, THREAD);
  77   return allocator.allocate();
  78 }
  79 
  80 inline oop CollectedHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) {
  81   ObjArrayAllocator allocator(klass, size, length, do_zero, THREAD);
  82   return allocator.allocate();
  83 }
  84 
  85 inline oop CollectedHeap::class_allocate(Klass* klass, int size, TRAPS) {
  86   ClassAllocator allocator(klass, size, THREAD);
  87   return allocator.allocate();
  88 }
  89 
  90 #endif // SHARE_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
< prev index next >