< prev index next >

src/share/vm/prims/jvm.cpp

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

@@ -441,18 +441,18 @@
 
 
 JVM_ENTRY_NO_ENV(void, JVM_GC(void))
   JVMWrapper("JVM_GC");
   if (!DisableExplicitGC) {
-    Universe::heap()->collect(GCCause::_java_lang_system_gc);
+    GC::gc()->heap()->collect(GCCause::_java_lang_system_gc);
   }
 JVM_END
 
 
 JVM_LEAF(jlong, JVM_MaxObjectInspectionAge(void))
   JVMWrapper("JVM_MaxObjectInspectionAge");
-  return Universe::heap()->millis_since_last_gc();
+  return GC::gc()->heap()->millis_since_last_gc();
 JVM_END
 
 
 static inline jlong convert_size_t_to_jlong(size_t val) {
   // In the 64-bit vm, a size_t can overflow a jlong (which is signed).

@@ -460,18 +460,18 @@
   LP64_ONLY(return (jlong)MIN2(val, (size_t)max_jlong);)
 }
 
 JVM_ENTRY_NO_ENV(jlong, JVM_TotalMemory(void))
   JVMWrapper("JVM_TotalMemory");
-  size_t n = Universe::heap()->capacity();
+  size_t n = GC::gc()->heap()->capacity();
   return convert_size_t_to_jlong(n);
 JVM_END
 
 
 JVM_ENTRY_NO_ENV(jlong, JVM_FreeMemory(void))
   JVMWrapper("JVM_FreeMemory");
-  CollectedHeap* ch = Universe::heap();
+  CollectedHeap* ch = GC::gc()->heap();
   size_t n;
   {
      MutexLocker x(Heap_lock);
      n = ch->capacity() - ch->used();
   }

@@ -479,11 +479,11 @@
 JVM_END
 
 
 JVM_ENTRY_NO_ENV(jlong, JVM_MaxMemory(void))
   JVMWrapper("JVM_MaxMemory");
-  size_t n = Universe::heap()->max_capacity();
+  size_t n = GC::gc()->heap()->max_capacity();
   return convert_size_t_to_jlong(n);
 JVM_END
 
 
 JVM_ENTRY_NO_ENV(jint, JVM_ActiveProcessorCount(void))

@@ -666,11 +666,11 @@
                                (size_t)align_object_size(size) / HeapWordsPerLong);
   // Clear the header
   new_obj_oop->init_mark();
 
   // Store check (mark entire object and let gc sort it out)
-  BarrierSet* bs = Universe::heap()->barrier_set();
+  BarrierSet* bs = GC::gc()->heap()->barrier_set();
   assert(bs->has_write_region_opt(), "Barrier set does not have write_region");
   bs->write_region(MemRegion((HeapWord*)new_obj_oop, size));
 
   Handle new_obj(THREAD, new_obj_oop);
   // Special handling for MemberNames.  Since they contain Method* metadata, they
< prev index next >