src/share/vm/gc_implementation/g1/g1RemSet.cpp

changeset 3219
c6a6e936dc68
parent 3179
811ec3d0833b
child 3267
ed80554efa25
     1.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Thu Oct 20 12:06:20 2011 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Sun Oct 23 23:06:06 2011 -0700
     1.3 @@ -122,10 +122,10 @@
     1.4    void set_try_claimed() { _try_claimed = true; }
     1.5  
     1.6    void scanCard(size_t index, HeapRegion *r) {
     1.7 -    DirtyCardToOopClosure* cl =
     1.8 -      r->new_dcto_closure(_oc,
     1.9 -                         CardTableModRefBS::Precise,
    1.10 -                         HeapRegionDCTOC::IntoCSFilterKind);
    1.11 +    // Stack allocate the DirtyCardToOopClosure instance
    1.12 +    HeapRegionDCTOC cl(_g1h, r, _oc,
    1.13 +                       CardTableModRefBS::Precise,
    1.14 +                       HeapRegionDCTOC::IntoCSFilterKind);
    1.15  
    1.16      // Set the "from" region in the closure.
    1.17      _oc->set_region(r);
    1.18 @@ -140,7 +140,7 @@
    1.19        // scans (the rsets of the regions in the cset can intersect).
    1.20        _ct_bs->set_card_claimed(index);
    1.21        _cards_done++;
    1.22 -      cl->do_MemRegion(mr);
    1.23 +      cl.do_MemRegion(mr);
    1.24      }
    1.25    }
    1.26  

mercurial