src/share/vm/gc_implementation/g1/heapRegionManager.hpp

Print this page
rev 7802 : 8061715:gc/g1/TestShrinkAuxiliaryData15.java fails

@@ -122,10 +122,14 @@
   bool is_free(HeapRegion* hr) const;
 #endif
   // Returns whether the given region is available for allocation.
   bool is_available(uint region) const;
 
+  void sum_memory_usage(size_t& used, size_t& committed, G1RegionToSpaceMapper* mapper) const {
+      used      += mapper->committed_size();
+      committed += mapper->reserved_size();
+  }
  public:
   // Empty constructor, we'll initialize it with the initialize() method.
   HeapRegionManager() : _regions(), _heap_mapper(NULL), _num_committed(0),
                     _next_bitmap_mapper(NULL), _prev_bitmap_mapper(NULL), _bot_mapper(NULL),
                     _allocated_heapregions_length(0), _available_map(),

@@ -194,10 +198,12 @@
   uint length() const { return _num_committed; }
 
   // Return the maximum number of regions in the heap.
   uint max_length() const { return (uint)_regions.length(); }
 
+  MemoryUsage get_auxiliary_data_memory_usage() const;
+
   MemRegion reserved() const { return MemRegion(heap_bottom(), heap_end()); }
 
   // Expand the sequence to reflect that the heap has grown. Either create new
   // HeapRegions, or re-use existing ones. Returns the number of regions the
   // sequence was expanded by. If a HeapRegion allocation fails, the resulting