hotspot/src/share/vm/memory/generation.cpp
changeset 27903 14c6e2f23fa0
parent 27899 17754211a7ab
child 27904 d606512952cc
equal deleted inserted replaced
27902:fe89161ff160 27903:14c6e2f23fa0
   148 
   148 
   149 bool Generation::is_in(const void* p) const {
   149 bool Generation::is_in(const void* p) const {
   150   GenerationIsInClosure blk(p);
   150   GenerationIsInClosure blk(p);
   151   ((Generation*)this)->space_iterate(&blk);
   151   ((Generation*)this)->space_iterate(&blk);
   152   return blk.sp != NULL;
   152   return blk.sp != NULL;
   153 }
       
   154 
       
   155 DefNewGeneration* Generation::as_DefNewGeneration() {
       
   156   assert((kind() == Generation::DefNew) ||
       
   157          (kind() == Generation::ParNew),
       
   158     "Wrong youngest generation type");
       
   159   return (DefNewGeneration*) this;
       
   160 }
   153 }
   161 
   154 
   162 Generation* Generation::next_gen() const {
   155 Generation* Generation::next_gen() const {
   163   GenCollectedHeap* gch = GenCollectedHeap::heap();
   156   GenCollectedHeap* gch = GenCollectedHeap::heap();
   164   int next = level() + 1;
   157   int next = level() + 1;