< prev index next >

src/share/vm/gc/serial/defNewGeneration.hpp

Print this page




 126   // Tenuring
 127   void adjust_desired_tenuring_threshold();
 128 
 129   // Spaces
 130   ContiguousSpace* _eden_space;
 131   ContiguousSpace* _from_space;
 132   ContiguousSpace* _to_space;
 133 
 134   STWGCTimer* _gc_timer;
 135 
 136   enum SomeProtectedConstants {
 137     // Generations are GenGrain-aligned and have size that are multiples of
 138     // GenGrain.
 139     MinFreeScratchWords = 100
 140   };
 141 
 142   // Return the size of a survivor space if this generation were of size
 143   // gen_size.
 144   size_t compute_survivor_size(size_t gen_size, size_t alignment) const {
 145     size_t n = gen_size / (SurvivorRatio + 2);
 146     return n > alignment ? align_size_down(n, alignment) : alignment;
 147   }
 148 
 149  public:  // was "protected" but caused compile error on win32
 150   class IsAliveClosure: public BoolObjectClosure {
 151     Generation* _young_gen;
 152   public:
 153     IsAliveClosure(Generation* young_gen);
 154     bool do_object_b(oop p);
 155   };
 156 
 157   class KeepAliveClosure: public OopClosure {
 158   protected:
 159     ScanWeakRefClosure* _cl;
 160     CardTableRS* _rs;
 161     template <class T> void do_oop_work(T* p);
 162   public:
 163     KeepAliveClosure(ScanWeakRefClosure* cl);
 164     virtual void do_oop(oop* p);
 165     virtual void do_oop(narrowOop* p);
 166   };




 126   // Tenuring
 127   void adjust_desired_tenuring_threshold();
 128 
 129   // Spaces
 130   ContiguousSpace* _eden_space;
 131   ContiguousSpace* _from_space;
 132   ContiguousSpace* _to_space;
 133 
 134   STWGCTimer* _gc_timer;
 135 
 136   enum SomeProtectedConstants {
 137     // Generations are GenGrain-aligned and have size that are multiples of
 138     // GenGrain.
 139     MinFreeScratchWords = 100
 140   };
 141 
 142   // Return the size of a survivor space if this generation were of size
 143   // gen_size.
 144   size_t compute_survivor_size(size_t gen_size, size_t alignment) const {
 145     size_t n = gen_size / (SurvivorRatio + 2);
 146     return n > alignment ? align_down(n, alignment) : alignment;
 147   }
 148 
 149  public:  // was "protected" but caused compile error on win32
 150   class IsAliveClosure: public BoolObjectClosure {
 151     Generation* _young_gen;
 152   public:
 153     IsAliveClosure(Generation* young_gen);
 154     bool do_object_b(oop p);
 155   };
 156 
 157   class KeepAliveClosure: public OopClosure {
 158   protected:
 159     ScanWeakRefClosure* _cl;
 160     CardTableRS* _rs;
 161     template <class T> void do_oop_work(T* p);
 162   public:
 163     KeepAliveClosure(ScanWeakRefClosure* cl);
 164     virtual void do_oop(oop* p);
 165     virtual void do_oop(narrowOop* p);
 166   };


< prev index next >