hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
changeset 13195 be27e1b6a4b9
parent 12779 06778de5193e
child 13196 6b399731153b
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Wed Jun 27 15:23:36 2012 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Thu Jun 28 17:03:16 2012 -0400
@@ -39,7 +39,7 @@
 
 // OtherRegionsTable
 
-class PerRegionTable: public CHeapObj {
+class PerRegionTable: public CHeapObj<mtGC> {
   friend class OtherRegionsTable;
   friend class HeapRegionRemSetIterator;
 
@@ -282,7 +282,7 @@
     // We must recount the "occupied."
     recount_occupied();
 #endif
-    FREE_C_HEAP_ARRAY(PerRegionTable*, _par_tables);
+    FREE_C_HEAP_ARRAY(PerRegionTable*, _par_tables, mtGC);
     _par_tables = NULL;
 #if COUNT_PAR_EXPANDS
     Atomic::inc(&n_par_contracts);
@@ -385,7 +385,7 @@
       if (res != NULL) return;
       // Otherwise, we reserved the right to do the expansion.
 
-      PerRegionTable** ptables = NEW_C_HEAP_ARRAY(PerRegionTable*, n);
+      PerRegionTable** ptables = NEW_C_HEAP_ARRAY(PerRegionTable*, n, mtGC);
       for (int i = 0; i < n; i++) {
         PerRegionTable* ptable = PerRegionTable::alloc(hr());
         ptables[i] = ptable;
@@ -546,9 +546,9 @@
   _from_card_cache_max_regions = max_regions;
 
   int n_par_rs = HeapRegionRemSet::num_par_rem_sets();
-  _from_card_cache = NEW_C_HEAP_ARRAY(int*, n_par_rs);
+  _from_card_cache = NEW_C_HEAP_ARRAY(int*, n_par_rs, mtGC);
   for (int i = 0; i < n_par_rs; i++) {
-    _from_card_cache[i] = NEW_C_HEAP_ARRAY(int, max_regions);
+    _from_card_cache[i] = NEW_C_HEAP_ARRAY(int, max_regions, mtGC);
     for (size_t j = 0; j < max_regions; j++) {
       _from_card_cache[i][j] = -1;  // An invalid value.
     }
@@ -1333,9 +1333,9 @@
            && _recorded_cards == NULL
            && _recorded_regions == NULL,
            "Inv");
-    _recorded_oops    = NEW_C_HEAP_ARRAY(OopOrNarrowOopStar, MaxRecorded);
-    _recorded_cards   = NEW_C_HEAP_ARRAY(HeapWord*,          MaxRecorded);
-    _recorded_regions = NEW_C_HEAP_ARRAY(HeapRegion*,        MaxRecorded);
+    _recorded_oops    = NEW_C_HEAP_ARRAY(OopOrNarrowOopStar, MaxRecorded, mtGC);
+    _recorded_cards   = NEW_C_HEAP_ARRAY(HeapWord*,          MaxRecorded, mtGC);
+    _recorded_regions = NEW_C_HEAP_ARRAY(HeapRegion*,        MaxRecorded, mtGC);
   }
   if (_n_recorded == MaxRecorded) {
     gclog_or_tty->print_cr("Filled up 'recorded' (%d).", MaxRecorded);
@@ -1356,8 +1356,8 @@
     assert(_n_recorded_events == 0
            && _recorded_event_index == NULL,
            "Inv");
-    _recorded_events = NEW_C_HEAP_ARRAY(Event, MaxRecordedEvents);
-    _recorded_event_index = NEW_C_HEAP_ARRAY(int, MaxRecordedEvents);
+    _recorded_events = NEW_C_HEAP_ARRAY(Event, MaxRecordedEvents, mtGC);
+    _recorded_event_index = NEW_C_HEAP_ARRAY(int, MaxRecordedEvents, mtGC);
   }
   if (_n_recorded_events == MaxRecordedEvents) {
     gclog_or_tty->print_cr("Filled up 'recorded_events' (%d).", MaxRecordedEvents);