1.1 --- a/src/share/vm/memory/referencePolicy.hpp Thu Nov 20 12:27:41 2008 -0800 1.2 +++ b/src/share/vm/memory/referencePolicy.hpp Thu Nov 20 16:56:09 2008 -0800 1.3 @@ -26,9 +26,11 @@ 1.4 // should be cleared. 1.5 1.6 1.7 -class ReferencePolicy : public ResourceObj { 1.8 +class ReferencePolicy : public CHeapObj { 1.9 public: 1.10 virtual bool should_clear_reference(oop p) { ShouldNotReachHere(); return true; } 1.11 + // Capture state (of-the-VM) information needed to evaluate the policy 1.12 + virtual void snap() { /* do nothing */ } 1.13 }; 1.14 1.15 class NeverClearPolicy : public ReferencePolicy { 1.16 @@ -48,6 +50,8 @@ 1.17 public: 1.18 LRUCurrentHeapPolicy(); 1.19 1.20 + // Capture state (of-the-VM) information needed to evaluate the policy 1.21 + void snap(); 1.22 bool should_clear_reference(oop p); 1.23 }; 1.24 1.25 @@ -58,5 +62,7 @@ 1.26 public: 1.27 LRUMaxHeapPolicy(); 1.28 1.29 + // Capture state (of-the-VM) information needed to evaluate the policy 1.30 + void snap(); 1.31 bool should_clear_reference(oop p); 1.32 };