< prev index next >

src/hotspot/share/gc/serial/defNewGeneration.cpp

Print this page




 157     // Tell the closure which CLD is being scanned so that it can be dirtied
 158     // if oops are left pointing into the young gen.
 159     _scavenge_closure->set_scanned_cld(cld);
 160 
 161     // Clean the cld since we're going to scavenge all the metadata.
 162     cld->oops_do(_scavenge_closure, false, /*clear_modified_oops*/true);
 163 
 164     _scavenge_closure->set_scanned_cld(NULL);
 165   }
 166 }
 167 
 168 ScanWeakRefClosure::ScanWeakRefClosure(DefNewGeneration* g) :
 169   _g(g)
 170 {
 171   _boundary = _g->reserved().end();
 172 }
 173 
 174 void ScanWeakRefClosure::do_oop(oop* p)       { ScanWeakRefClosure::do_oop_work(p); }
 175 void ScanWeakRefClosure::do_oop(narrowOop* p) { ScanWeakRefClosure::do_oop_work(p); }
 176 
 177 void FilteringClosure::do_oop(oop* p)       { FilteringClosure::do_oop_work(p); }
 178 void FilteringClosure::do_oop(narrowOop* p) { FilteringClosure::do_oop_work(p); }
 179 
 180 DefNewGeneration::DefNewGeneration(ReservedSpace rs,
 181                                    size_t initial_size,
 182                                    const char* policy)
 183   : Generation(rs, initial_size),
 184     _preserved_marks_set(false /* in_c_heap */),
 185     _promo_failure_drain_in_progress(false),
 186     _should_allocate_from_space(false)
 187 {
 188   MemRegion cmr((HeapWord*)_virtual_space.low(),
 189                 (HeapWord*)_virtual_space.high());
 190   GenCollectedHeap* gch = GenCollectedHeap::heap();
 191 
 192   gch->rem_set()->resize_covered_region(cmr);
 193 
 194   _eden_space = new ContiguousSpace();
 195   _from_space = new ContiguousSpace();
 196   _to_space   = new ContiguousSpace();
 197 
 198   if (_eden_space == NULL || _from_space == NULL || _to_space == NULL) {
 199     vm_exit_during_initialization("Could not allocate a new gen space");




 157     // Tell the closure which CLD is being scanned so that it can be dirtied
 158     // if oops are left pointing into the young gen.
 159     _scavenge_closure->set_scanned_cld(cld);
 160 
 161     // Clean the cld since we're going to scavenge all the metadata.
 162     cld->oops_do(_scavenge_closure, false, /*clear_modified_oops*/true);
 163 
 164     _scavenge_closure->set_scanned_cld(NULL);
 165   }
 166 }
 167 
 168 ScanWeakRefClosure::ScanWeakRefClosure(DefNewGeneration* g) :
 169   _g(g)
 170 {
 171   _boundary = _g->reserved().end();
 172 }
 173 
 174 void ScanWeakRefClosure::do_oop(oop* p)       { ScanWeakRefClosure::do_oop_work(p); }
 175 void ScanWeakRefClosure::do_oop(narrowOop* p) { ScanWeakRefClosure::do_oop_work(p); }
 176 



 177 DefNewGeneration::DefNewGeneration(ReservedSpace rs,
 178                                    size_t initial_size,
 179                                    const char* policy)
 180   : Generation(rs, initial_size),
 181     _preserved_marks_set(false /* in_c_heap */),
 182     _promo_failure_drain_in_progress(false),
 183     _should_allocate_from_space(false)
 184 {
 185   MemRegion cmr((HeapWord*)_virtual_space.low(),
 186                 (HeapWord*)_virtual_space.high());
 187   GenCollectedHeap* gch = GenCollectedHeap::heap();
 188 
 189   gch->rem_set()->resize_covered_region(cmr);
 190 
 191   _eden_space = new ContiguousSpace();
 192   _from_space = new ContiguousSpace();
 193   _to_space   = new ContiguousSpace();
 194 
 195   if (_eden_space == NULL || _from_space == NULL || _to_space == NULL) {
 196     vm_exit_during_initialization("Could not allocate a new gen space");


< prev index next >