hotspot/src/share/vm/memory/genMarkSweep.cpp
changeset 13195 be27e1b6a4b9
parent 12630 ddf6ee008138
child 13728 882756847a04
equal deleted inserted replaced
13099:64752e56d721 13195:be27e1b6a4b9
   201   _preserved_marks = (PreservedMark*)scratch;
   201   _preserved_marks = (PreservedMark*)scratch;
   202   _preserved_count = 0;
   202   _preserved_count = 0;
   203 
   203 
   204 #ifdef VALIDATE_MARK_SWEEP
   204 #ifdef VALIDATE_MARK_SWEEP
   205   if (ValidateMarkSweep) {
   205   if (ValidateMarkSweep) {
   206     _root_refs_stack    = new (ResourceObj::C_HEAP) GrowableArray<void*>(100, true);
   206     _root_refs_stack    = new (ResourceObj::C_HEAP, mtGC) GrowableArray<void*>(100, true);
   207     _other_refs_stack   = new (ResourceObj::C_HEAP) GrowableArray<void*>(100, true);
   207     _other_refs_stack   = new (ResourceObj::C_HEAP, mtGC) GrowableArray<void*>(100, true);
   208     _adjusted_pointers  = new (ResourceObj::C_HEAP) GrowableArray<void*>(100, true);
   208     _adjusted_pointers  = new (ResourceObj::C_HEAP, mtGC) GrowableArray<void*>(100, true);
   209     _live_oops          = new (ResourceObj::C_HEAP) GrowableArray<oop>(100, true);
   209     _live_oops          = new (ResourceObj::C_HEAP, mtGC) GrowableArray<oop>(100, true);
   210     _live_oops_moved_to = new (ResourceObj::C_HEAP) GrowableArray<oop>(100, true);
   210     _live_oops_moved_to = new (ResourceObj::C_HEAP, mtGC) GrowableArray<oop>(100, true);
   211     _live_oops_size     = new (ResourceObj::C_HEAP) GrowableArray<size_t>(100, true);
   211     _live_oops_size     = new (ResourceObj::C_HEAP, mtGC) GrowableArray<size_t>(100, true);
   212   }
   212   }
   213   if (RecordMarkSweepCompaction) {
   213   if (RecordMarkSweepCompaction) {
   214     if (_cur_gc_live_oops == NULL) {
   214     if (_cur_gc_live_oops == NULL) {
   215       _cur_gc_live_oops           = new(ResourceObj::C_HEAP) GrowableArray<HeapWord*>(100, true);
   215       _cur_gc_live_oops           = new(ResourceObj::C_HEAP, mtGC) GrowableArray<HeapWord*>(100, true);
   216       _cur_gc_live_oops_moved_to  = new(ResourceObj::C_HEAP) GrowableArray<HeapWord*>(100, true);
   216       _cur_gc_live_oops_moved_to  = new(ResourceObj::C_HEAP, mtGC) GrowableArray<HeapWord*>(100, true);
   217       _cur_gc_live_oops_size      = new(ResourceObj::C_HEAP) GrowableArray<size_t>(100, true);
   217       _cur_gc_live_oops_size      = new(ResourceObj::C_HEAP, mtGC) GrowableArray<size_t>(100, true);
   218       _last_gc_live_oops          = new(ResourceObj::C_HEAP) GrowableArray<HeapWord*>(100, true);
   218       _last_gc_live_oops          = new(ResourceObj::C_HEAP, mtGC) GrowableArray<HeapWord*>(100, true);
   219       _last_gc_live_oops_moved_to = new(ResourceObj::C_HEAP) GrowableArray<HeapWord*>(100, true);
   219       _last_gc_live_oops_moved_to = new(ResourceObj::C_HEAP, mtGC) GrowableArray<HeapWord*>(100, true);
   220       _last_gc_live_oops_size     = new(ResourceObj::C_HEAP) GrowableArray<size_t>(100, true);
   220       _last_gc_live_oops_size     = new(ResourceObj::C_HEAP, mtGC) GrowableArray<size_t>(100, true);
   221     } else {
   221     } else {
   222       _cur_gc_live_oops->clear();
   222       _cur_gc_live_oops->clear();
   223       _cur_gc_live_oops_moved_to->clear();
   223       _cur_gc_live_oops_moved_to->clear();
   224       _cur_gc_live_oops_size->clear();
   224       _cur_gc_live_oops_size->clear();
   225     }
   225     }