< prev index next >

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

Print this page
rev 11777 : [mq]: gcinterface.patch

@@ -147,14 +147,14 @@
              "Unexpected exception, will result in uninitialized storage");
       return result;
     }
   }
   bool gc_overhead_limit_was_exceeded = false;
-  result = Universe::heap()->mem_allocate(size,
+  result = GC::gc()->heap()->mem_allocate(size,
                                           &gc_overhead_limit_was_exceeded);
   if (result != NULL) {
-    NOT_PRODUCT(Universe::heap()->
+    NOT_PRODUCT(GC::gc()->heap()->
       check_for_non_bad_heap_word_value(result, size));
     assert(!HAS_PENDING_EXCEPTION,
            "Unexpected exception, will result in uninitialized storage");
     THREAD->incr_allocated_bytes(size * HeapWordSize);
 

@@ -214,54 +214,54 @@
   Copy::fill_to_aligned_words(obj + hs, size - hs);
 }
 
 oop CollectedHeap::obj_allocate(KlassHandle klass, int size, TRAPS) {
   debug_only(check_for_valid_allocation_state());
-  assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed");
+  assert(!GC::gc()->heap()->is_gc_active(), "Allocation during gc not allowed");
   assert(size >= 0, "int won't convert to size_t");
   HeapWord* obj = common_mem_allocate_init(klass, size, CHECK_NULL);
   post_allocation_setup_obj(klass, obj, size);
-  NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size));
+  NOT_PRODUCT(GC::gc()->heap()->check_for_bad_heap_word_value(obj, size));
   return (oop)obj;
 }
 
 oop CollectedHeap::class_allocate(KlassHandle klass, int size, TRAPS) {
   debug_only(check_for_valid_allocation_state());
-  assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed");
+  assert(!GC::gc()->heap()->is_gc_active(), "Allocation during gc not allowed");
   assert(size >= 0, "int won't convert to size_t");
   HeapWord* obj = common_mem_allocate_init(klass, size, CHECK_NULL);
   post_allocation_setup_class(klass, obj, size); // set oop_size
-  NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size));
+  NOT_PRODUCT(GC::gc()->heap()->check_for_bad_heap_word_value(obj, size));
   return (oop)obj;
 }
 
 oop CollectedHeap::array_allocate(KlassHandle klass,
                                   int size,
                                   int length,
                                   TRAPS) {
   debug_only(check_for_valid_allocation_state());
-  assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed");
+  assert(!GC::gc()->heap()->is_gc_active(), "Allocation during gc not allowed");
   assert(size >= 0, "int won't convert to size_t");
   HeapWord* obj = common_mem_allocate_init(klass, size, CHECK_NULL);
   post_allocation_setup_array(klass, obj, length);
-  NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size));
+  NOT_PRODUCT(GC::gc()->heap()->check_for_bad_heap_word_value(obj, size));
   return (oop)obj;
 }
 
 oop CollectedHeap::array_allocate_nozero(KlassHandle klass,
                                          int size,
                                          int length,
                                          TRAPS) {
   debug_only(check_for_valid_allocation_state());
-  assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed");
+  assert(!GC::gc()->heap()->is_gc_active(), "Allocation during gc not allowed");
   assert(size >= 0, "int won't convert to size_t");
   HeapWord* obj = common_mem_allocate_noinit(klass, size, CHECK_NULL);
   ((oop)obj)->set_klass_gap(0);
   post_allocation_setup_array(klass, obj, length);
 #ifndef PRODUCT
   const size_t hs = oopDesc::header_size()+1;
-  Universe::heap()->check_for_non_bad_heap_word_value(obj+hs, size-hs);
+  GC::gc()->heap()->check_for_non_bad_heap_word_value(obj+hs, size-hs);
 #endif
   return (oop)obj;
 }
 
 inline HeapWord* CollectedHeap::align_allocation_or_fail(HeapWord* addr,
< prev index next >