< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.hpp

Print this page

        

@@ -350,11 +350,11 @@
     assert_at_safepoint();                                                    \
     assert(Thread::current_or_null() != NULL, "no current thread");           \
     assert(Thread::current()->is_VM_thread(), "current thread is not VM thread"); \
   } while (0)
 
-  // The young region list.
+  // The young region lists.
   G1EdenRegions _eden;
   G1SurvivorRegions _survivor;
 
   STWGCTimer* _gc_timer_stw;
 

@@ -1039,11 +1039,11 @@
   inline void old_set_remove(HeapRegion* hr);
 
   inline void archive_set_add(HeapRegion* hr);
 
   size_t non_young_capacity_bytes() {
-    return (old_regions_count() + _archive_set.length() + humongous_regions_count()) * HeapRegion::GrainBytes;
+    return (old_regions_count() + archive_regions_count() + humongous_regions_count()) * HeapRegion::GrainBytes;
   }
 
   // Determine whether the given region is one that we are using as an
   // old GC alloc region.
   bool is_old_gc_alloc_region(HeapRegion* hr);

@@ -1214,23 +1214,22 @@
   // Print the maximum heap capacity.
   virtual size_t max_capacity() const;
 
   virtual jlong millis_since_last_gc();
 
-
   // Convenience function to be used in situations where the heap type can be
   // asserted to be this type.
   static G1CollectedHeap* heap();
 
   void set_region_short_lived_locked(HeapRegion* hr);
-  // add appropriate methods for any other surv rate groups
+  // add appropriate methods for any other survivor rate groups
 
   const G1SurvivorRegions* survivor() const { return &_survivor; }
 
   uint eden_regions_count() const { return _eden.length(); }
   uint survivor_regions_count() const { return _survivor.length(); }
-  uint young_regions_count() const { return _eden.length() + _survivor.length(); }
+  uint young_regions_count() const { return eden_regions_count() + survivor_regions_count(); }
   uint old_regions_count() const { return _old_set.length(); }
   uint archive_regions_count() const { return _archive_set.length(); }
   uint humongous_regions_count() const { return _humongous_set.length(); }
 
 #ifdef ASSERT
< prev index next >