diff -r 6b43d186eb8d -r dcf9714addbe hotspot/src/share/vm/memory/referencePolicy.hpp --- a/hotspot/src/share/vm/memory/referencePolicy.hpp Thu Nov 20 12:27:41 2008 -0800 +++ b/hotspot/src/share/vm/memory/referencePolicy.hpp Thu Nov 20 16:56:09 2008 -0800 @@ -26,9 +26,11 @@ // should be cleared. -class ReferencePolicy : public ResourceObj { +class ReferencePolicy : public CHeapObj { public: virtual bool should_clear_reference(oop p) { ShouldNotReachHere(); return true; } + // Capture state (of-the-VM) information needed to evaluate the policy + virtual void snap() { /* do nothing */ } }; class NeverClearPolicy : public ReferencePolicy { @@ -48,6 +50,8 @@ public: LRUCurrentHeapPolicy(); + // Capture state (of-the-VM) information needed to evaluate the policy + void snap(); bool should_clear_reference(oop p); }; @@ -58,5 +62,7 @@ public: LRUMaxHeapPolicy(); + // Capture state (of-the-VM) information needed to evaluate the policy + void snap(); bool should_clear_reference(oop p); };