1.1 --- a/src/share/vm/memory/referencePolicy.hpp Tue Oct 11 10:21:36 2011 +0200 1.2 +++ b/src/share/vm/memory/referencePolicy.hpp Wed Oct 12 10:25:51 2011 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -31,19 +31,27 @@ 1.11 1.12 class ReferencePolicy : public CHeapObj { 1.13 public: 1.14 - virtual bool should_clear_reference(oop p) { ShouldNotReachHere(); return true; } 1.15 + virtual bool should_clear_reference(oop p, jlong timestamp_clock) { 1.16 + ShouldNotReachHere(); 1.17 + return true; 1.18 + } 1.19 + 1.20 // Capture state (of-the-VM) information needed to evaluate the policy 1.21 virtual void setup() { /* do nothing */ } 1.22 }; 1.23 1.24 class NeverClearPolicy : public ReferencePolicy { 1.25 public: 1.26 - bool should_clear_reference(oop p) { return false; } 1.27 + virtual bool should_clear_reference(oop p, jlong timestamp_clock) { 1.28 + return false; 1.29 + } 1.30 }; 1.31 1.32 class AlwaysClearPolicy : public ReferencePolicy { 1.33 public: 1.34 - bool should_clear_reference(oop p) { return true; } 1.35 + virtual bool should_clear_reference(oop p, jlong timestamp_clock) { 1.36 + return true; 1.37 + } 1.38 }; 1.39 1.40 class LRUCurrentHeapPolicy : public ReferencePolicy { 1.41 @@ -55,7 +63,7 @@ 1.42 1.43 // Capture state (of-the-VM) information needed to evaluate the policy 1.44 void setup(); 1.45 - bool should_clear_reference(oop p); 1.46 + virtual bool should_clear_reference(oop p, jlong timestamp_clock); 1.47 }; 1.48 1.49 class LRUMaxHeapPolicy : public ReferencePolicy { 1.50 @@ -67,7 +75,7 @@ 1.51 1.52 // Capture state (of-the-VM) information needed to evaluate the policy 1.53 void setup(); 1.54 - bool should_clear_reference(oop p); 1.55 + virtual bool should_clear_reference(oop p, jlong timestamp_clock); 1.56 }; 1.57 1.58 #endif // SHARE_VM_MEMORY_REFERENCEPOLICY_HPP