--- a/src/hotspot/share/gc/shared/genCollectedHeap.hpp Thu Feb 22 18:35:40 2018 +0100
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.hpp Thu Feb 22 18:36:07 2018 +0100
@@ -29,6 +29,7 @@
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/collectorPolicy.hpp"
#include "gc/shared/generation.hpp"
+#include "gc/shared/softRefGenPolicy.hpp"
class StrongRootsScope;
class SubTasksDone;
@@ -70,6 +71,8 @@
// The generational collector policy.
GenCollectorPolicy* _gen_policy;
+ SoftRefGenPolicy _soft_ref_gen_policy;
+
// Indicates that the most recent previous incremental collection failed.
// The flag is cleared when an action is taken that might clear the
// condition that caused that incremental collection to fail.
@@ -166,6 +169,8 @@
virtual CollectorPolicy* collector_policy() const { return gen_policy(); }
+ virtual SoftRefPolicy* soft_ref_policy() { return &_soft_ref_gen_policy; }
+
// Adaptive size policy
virtual AdaptiveSizePolicy* size_policy() {
return gen_policy()->size_policy();