1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Jun 29 17:12:15 2012 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Jul 02 13:11:28 2012 -0400 1.3 @@ -1916,14 +1916,14 @@ 1.4 assert(n_rem_sets > 0, "Invariant."); 1.5 1.6 HeapRegionRemSetIterator** iter_arr = 1.7 - NEW_C_HEAP_ARRAY(HeapRegionRemSetIterator*, n_queues); 1.8 + NEW_C_HEAP_ARRAY(HeapRegionRemSetIterator*, n_queues, mtGC); 1.9 for (int i = 0; i < n_queues; i++) { 1.10 iter_arr[i] = new HeapRegionRemSetIterator(); 1.11 } 1.12 _rem_set_iterator = iter_arr; 1.13 1.14 - _worker_cset_start_region = NEW_C_HEAP_ARRAY(HeapRegion*, n_queues); 1.15 - _worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(unsigned int, n_queues); 1.16 + _worker_cset_start_region = NEW_C_HEAP_ARRAY(HeapRegion*, n_queues, mtGC); 1.17 + _worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(unsigned int, n_queues, mtGC); 1.18 1.19 for (int i = 0; i < n_queues; i++) { 1.20 RefToScanQueue* q = new RefToScanQueue(); 1.21 @@ -2082,7 +2082,7 @@ 1.22 1.23 _in_cset_fast_test_length = max_regions(); 1.24 _in_cset_fast_test_base = 1.25 - NEW_C_HEAP_ARRAY(bool, (size_t) _in_cset_fast_test_length); 1.26 + NEW_C_HEAP_ARRAY(bool, (size_t) _in_cset_fast_test_length, mtGC); 1.27 1.28 // We're biasing _in_cset_fast_test to avoid subtracting the 1.29 // beginning of the heap every time we want to index; basically 1.30 @@ -3505,7 +3505,7 @@ 1.31 G1CollectedHeap::setup_surviving_young_words() { 1.32 assert(_surviving_young_words == NULL, "pre-condition"); 1.33 uint array_length = g1_policy()->young_cset_region_length(); 1.34 - _surviving_young_words = NEW_C_HEAP_ARRAY(size_t, (size_t) array_length); 1.35 + _surviving_young_words = NEW_C_HEAP_ARRAY(size_t, (size_t) array_length, mtGC); 1.36 if (_surviving_young_words == NULL) { 1.37 vm_exit_out_of_memory(sizeof(size_t) * array_length, 1.38 "Not enough space for young surv words summary."); 1.39 @@ -3530,7 +3530,7 @@ 1.40 void 1.41 G1CollectedHeap::cleanup_surviving_young_words() { 1.42 guarantee( _surviving_young_words != NULL, "pre-condition" ); 1.43 - FREE_C_HEAP_ARRAY(size_t, _surviving_young_words); 1.44 + FREE_C_HEAP_ARRAY(size_t, _surviving_young_words, mtGC); 1.45 _surviving_young_words = NULL; 1.46 } 1.47 1.48 @@ -4073,7 +4073,7 @@ 1.49 void G1CollectedHeap::init_for_evac_failure(OopsInHeapRegionClosure* cl) { 1.50 _drain_in_progress = false; 1.51 set_evac_failure_closure(cl); 1.52 - _evac_failure_scan_stack = new (ResourceObj::C_HEAP) GrowableArray<oop>(40, true); 1.53 + _evac_failure_scan_stack = new (ResourceObj::C_HEAP, mtGC) GrowableArray<oop>(40, true); 1.54 } 1.55 1.56 void G1CollectedHeap::finalize_for_evac_failure() { 1.57 @@ -4207,9 +4207,9 @@ 1.58 if (_objs_with_preserved_marks == NULL) { 1.59 assert(_preserved_marks_of_objs == NULL, "Both or none."); 1.60 _objs_with_preserved_marks = 1.61 - new (ResourceObj::C_HEAP) GrowableArray<oop>(40, true); 1.62 + new (ResourceObj::C_HEAP, mtGC) GrowableArray<oop>(40, true); 1.63 _preserved_marks_of_objs = 1.64 - new (ResourceObj::C_HEAP) GrowableArray<markOop>(40, true); 1.65 + new (ResourceObj::C_HEAP, mtGC) GrowableArray<markOop>(40, true); 1.66 } 1.67 _objs_with_preserved_marks->push(obj); 1.68 _preserved_marks_of_objs->push(m); 1.69 @@ -4269,7 +4269,7 @@ 1.70 uint array_length = PADDING_ELEM_NUM + 1.71 real_length + 1.72 PADDING_ELEM_NUM; 1.73 - _surviving_young_words_base = NEW_C_HEAP_ARRAY(size_t, array_length); 1.74 + _surviving_young_words_base = NEW_C_HEAP_ARRAY(size_t, array_length, mtGC); 1.75 if (_surviving_young_words_base == NULL) 1.76 vm_exit_out_of_memory(array_length * sizeof(size_t), 1.77 "Not enough space for young surv histo.");