// referencePolicy is used to determine when soft reference objects // should be cleared.
class ReferencePolicy : public CHeapObj<mtGC> { public: virtualbool should_clear_reference(oop p, jlong timestamp_clock) {
ShouldNotReachHere(); returntrue;
}
// Capture state (of-the-VM) information needed to evaluate the policy virtualvoid setup() { /* do nothing */ }
};
class NeverClearPolicy : public ReferencePolicy { public: virtualbool should_clear_reference(oop p, jlong timestamp_clock) { returnfalse;
}
};
class AlwaysClearPolicy : public ReferencePolicy { public: virtualbool should_clear_reference(oop p, jlong timestamp_clock) { returntrue;
}
};
class LRUCurrentHeapPolicy : public ReferencePolicy { private:
jlong _max_interval;
public:
LRUCurrentHeapPolicy();
// Capture state (of-the-VM) information needed to evaluate the policy void setup(); virtualbool should_clear_reference(oop p, jlong timestamp_clock);
};
class LRUMaxHeapPolicy : public ReferencePolicy { private:
jlong _max_interval;
public:
LRUMaxHeapPolicy();
// Capture state (of-the-VM) information needed to evaluate the policy void setup(); virtualbool should_clear_reference(oop p, jlong timestamp_clock);
};
#endif// SHARE_GC_SHARED_REFERENCEPOLICY_HPP
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.