117 // Called by the GC after Soft Refs have been cleared to indicate
118 // that the request in _should_clear_all_soft_refs has been fulfilled.
119 void cleared_all_soft_refs();
120
121 // Identification methods.
122 virtual GenCollectorPolicy* as_generation_policy() { return NULL; }
123 virtual MarkSweepPolicy* as_mark_sweep_policy() { return NULL; }
124 #if INCLUDE_ALL_GCS
125 virtual ConcurrentMarkSweepPolicy* as_concurrent_mark_sweep_policy() { return NULL; }
126 #endif // INCLUDE_ALL_GCS
127 // Note that these are not virtual.
128 bool is_generation_policy() { return as_generation_policy() != NULL; }
129 bool is_mark_sweep_policy() { return as_mark_sweep_policy() != NULL; }
130 #if INCLUDE_ALL_GCS
131 bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
132 #else // INCLUDE_ALL_GCS
133 bool is_concurrent_mark_sweep_policy() { return false; }
134 #endif // INCLUDE_ALL_GCS
135
136
137 virtual CardTableRS* create_rem_set(MemRegion reserved);
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 }
|
117 // Called by the GC after Soft Refs have been cleared to indicate
118 // that the request in _should_clear_all_soft_refs has been fulfilled.
119 void cleared_all_soft_refs();
120
121 // Identification methods.
122 virtual GenCollectorPolicy* as_generation_policy() { return NULL; }
123 virtual MarkSweepPolicy* as_mark_sweep_policy() { return NULL; }
124 #if INCLUDE_ALL_GCS
125 virtual ConcurrentMarkSweepPolicy* as_concurrent_mark_sweep_policy() { return NULL; }
126 #endif // INCLUDE_ALL_GCS
127 // Note that these are not virtual.
128 bool is_generation_policy() { return as_generation_policy() != NULL; }
129 bool is_mark_sweep_policy() { return as_mark_sweep_policy() != NULL; }
130 #if INCLUDE_ALL_GCS
131 bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
132 #else // INCLUDE_ALL_GCS
133 bool is_concurrent_mark_sweep_policy() { return false; }
134 #endif // INCLUDE_ALL_GCS
135
136
137 virtual CardTableRS* create_rem_set(MemRegion reserved, CardTableModRefBSForCTRS* ct_bs);
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 }
|