equal
deleted
inserted
replaced
29 #include "gc/shared/collectorPolicy.hpp" |
29 #include "gc/shared/collectorPolicy.hpp" |
30 #include "gc/shared/generation.hpp" |
30 #include "gc/shared/generation.hpp" |
31 #include "gc/shared/softRefGenPolicy.hpp" |
31 #include "gc/shared/softRefGenPolicy.hpp" |
32 |
32 |
33 class AdaptiveSizePolicy; |
33 class AdaptiveSizePolicy; |
|
34 class GenerationSpec; |
34 class StrongRootsScope; |
35 class StrongRootsScope; |
35 class SubTasksDone; |
36 class SubTasksDone; |
36 class WorkGang; |
37 class WorkGang; |
37 |
38 |
38 // A "GenCollectedHeap" is a CollectedHeap that uses generational |
39 // A "GenCollectedHeap" is a CollectedHeap that uses generational |
63 |
64 |
64 private: |
65 private: |
65 Generation* _young_gen; |
66 Generation* _young_gen; |
66 Generation* _old_gen; |
67 Generation* _old_gen; |
67 |
68 |
|
69 GenerationSpec* _young_gen_spec; |
|
70 GenerationSpec* _old_gen_spec; |
|
71 |
68 // The singleton CardTable Remembered Set. |
72 // The singleton CardTable Remembered Set. |
69 CardTableRS* _rem_set; |
73 CardTableRS* _rem_set; |
70 |
74 |
71 // The generational collector policy. |
75 // The generational collector policy. |
72 GenCollectorPolicy* _gen_policy; |
76 GenCollectorPolicy* _gen_policy; |
147 |
151 |
148 // Does the "cause" of GC indicate that |
152 // Does the "cause" of GC indicate that |
149 // we absolutely __must__ clear soft refs? |
153 // we absolutely __must__ clear soft refs? |
150 bool must_clear_all_soft_refs(); |
154 bool must_clear_all_soft_refs(); |
151 |
155 |
152 GenCollectedHeap(GenCollectorPolicy *policy); |
156 GenCollectedHeap(GenCollectorPolicy *policy, |
|
157 Generation::Name young, |
|
158 Generation::Name old); |
153 |
159 |
154 virtual void check_gen_kinds() = 0; |
160 virtual void check_gen_kinds() = 0; |
155 |
161 |
156 public: |
162 public: |
157 |
163 |
168 Generation* young_gen() const { return _young_gen; } |
174 Generation* young_gen() const { return _young_gen; } |
169 Generation* old_gen() const { return _old_gen; } |
175 Generation* old_gen() const { return _old_gen; } |
170 |
176 |
171 bool is_young_gen(const Generation* gen) const { return gen == _young_gen; } |
177 bool is_young_gen(const Generation* gen) const { return gen == _young_gen; } |
172 bool is_old_gen(const Generation* gen) const { return gen == _old_gen; } |
178 bool is_old_gen(const Generation* gen) const { return gen == _old_gen; } |
|
179 |
|
180 GenerationSpec* young_gen_spec() const; |
|
181 GenerationSpec* old_gen_spec() const; |
173 |
182 |
174 // The generational collector policy. |
183 // The generational collector policy. |
175 GenCollectorPolicy* gen_policy() const { return _gen_policy; } |
184 GenCollectorPolicy* gen_policy() const { return _gen_policy; } |
176 |
185 |
177 virtual CollectorPolicy* collector_policy() const { return gen_policy(); } |
186 virtual CollectorPolicy* collector_policy() const { return gen_policy(); } |