138
139 MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
140 size_t size,
141 Metaspace::MetadataType mdtype);
142 };
143
144 class ClearedAllSoftRefs : public StackObj {
145 bool _clear_all_soft_refs;
146 CollectorPolicy* _collector_policy;
147 public:
148 ClearedAllSoftRefs(bool clear_all_soft_refs,
149 CollectorPolicy* collector_policy) :
150 _clear_all_soft_refs(clear_all_soft_refs),
151 _collector_policy(collector_policy) {}
152
153 ~ClearedAllSoftRefs() {
154 if (_clear_all_soft_refs) {
155 _collector_policy->cleared_all_soft_refs();
156 }
157 }
158 };
159
160 class GenCollectorPolicy : public CollectorPolicy {
161 friend class TestGenCollectorPolicy;
162 friend class VMStructs;
163 protected:
164 size_t _min_young_size;
165 size_t _initial_young_size;
166 size_t _max_young_size;
167 size_t _min_old_size;
168 size_t _initial_old_size;
169 size_t _max_old_size;
170
171 // _gen_alignment and _space_alignment will have the same value most of the
172 // time. When using large pages they can differ.
173 size_t _gen_alignment;
174
175 GenerationSpec* _young_gen_spec;
176 GenerationSpec* _old_gen_spec;
177
|
138
139 MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
140 size_t size,
141 Metaspace::MetadataType mdtype);
142 };
143
144 class ClearedAllSoftRefs : public StackObj {
145 bool _clear_all_soft_refs;
146 CollectorPolicy* _collector_policy;
147 public:
148 ClearedAllSoftRefs(bool clear_all_soft_refs,
149 CollectorPolicy* collector_policy) :
150 _clear_all_soft_refs(clear_all_soft_refs),
151 _collector_policy(collector_policy) {}
152
153 ~ClearedAllSoftRefs() {
154 if (_clear_all_soft_refs) {
155 _collector_policy->cleared_all_soft_refs();
156 }
157 }
158
159 bool should_clear() { return _clear_all_soft_refs; }
160 };
161
162 class GenCollectorPolicy : public CollectorPolicy {
163 friend class TestGenCollectorPolicy;
164 friend class VMStructs;
165 protected:
166 size_t _min_young_size;
167 size_t _initial_young_size;
168 size_t _max_young_size;
169 size_t _min_old_size;
170 size_t _initial_old_size;
171 size_t _max_old_size;
172
173 // _gen_alignment and _space_alignment will have the same value most of the
174 // time. When using large pages they can differ.
175 size_t _gen_alignment;
176
177 GenerationSpec* _young_gen_spec;
178 GenerationSpec* _old_gen_spec;
179
|