152 return n > alignment ? align_size_down(n, alignment) : alignment; |
152 return n > alignment ? align_size_down(n, alignment) : alignment; |
153 } |
153 } |
154 |
154 |
155 public: // was "protected" but caused compile error on win32 |
155 public: // was "protected" but caused compile error on win32 |
156 class IsAliveClosure: public BoolObjectClosure { |
156 class IsAliveClosure: public BoolObjectClosure { |
157 Generation* _g; |
157 Generation* _young_gen; |
158 public: |
158 public: |
159 IsAliveClosure(Generation* g); |
159 IsAliveClosure(Generation* young_gen); |
160 bool do_object_b(oop p); |
160 bool do_object_b(oop p); |
161 }; |
161 }; |
162 |
162 |
163 class KeepAliveClosure: public OopClosure { |
163 class KeepAliveClosure: public OopClosure { |
164 protected: |
164 protected: |
181 virtual void do_oop(narrowOop* p); |
181 virtual void do_oop(narrowOop* p); |
182 }; |
182 }; |
183 |
183 |
184 class EvacuateFollowersClosure: public VoidClosure { |
184 class EvacuateFollowersClosure: public VoidClosure { |
185 GenCollectedHeap* _gch; |
185 GenCollectedHeap* _gch; |
186 int _level; |
|
187 ScanClosure* _scan_cur_or_nonheap; |
186 ScanClosure* _scan_cur_or_nonheap; |
188 ScanClosure* _scan_older; |
187 ScanClosure* _scan_older; |
189 public: |
188 public: |
190 EvacuateFollowersClosure(GenCollectedHeap* gch, int level, |
189 EvacuateFollowersClosure(GenCollectedHeap* gch, |
191 ScanClosure* cur, ScanClosure* older); |
190 ScanClosure* cur, ScanClosure* older); |
192 void do_void(); |
191 void do_void(); |
193 }; |
192 }; |
194 |
193 |
195 class FastEvacuateFollowersClosure: public VoidClosure { |
194 class FastEvacuateFollowersClosure: public VoidClosure { |
196 GenCollectedHeap* _gch; |
195 GenCollectedHeap* _gch; |
197 int _level; |
|
198 DefNewGeneration* _gen; |
196 DefNewGeneration* _gen; |
199 FastScanClosure* _scan_cur_or_nonheap; |
197 FastScanClosure* _scan_cur_or_nonheap; |
200 FastScanClosure* _scan_older; |
198 FastScanClosure* _scan_older; |
201 public: |
199 public: |
202 FastEvacuateFollowersClosure(GenCollectedHeap* gch, int level, |
200 FastEvacuateFollowersClosure(GenCollectedHeap* gch, |
203 DefNewGeneration* gen, |
|
204 FastScanClosure* cur, |
201 FastScanClosure* cur, |
205 FastScanClosure* older); |
202 FastScanClosure* older); |
206 void do_void(); |
203 void do_void(); |
207 }; |
204 }; |
208 |
205 |
209 public: |
206 public: |
210 DefNewGeneration(ReservedSpace rs, size_t initial_byte_size, int level, |
207 DefNewGeneration(ReservedSpace rs, size_t initial_byte_size, |
211 const char* policy="Copy"); |
208 const char* policy="Copy"); |
212 |
209 |
213 virtual void ref_processor_init(); |
210 virtual void ref_processor_init(); |
214 |
211 |
215 virtual Generation::Name kind() { return Generation::DefNew; } |
212 virtual Generation::Name kind() { return Generation::DefNew; } |